bioneuralnet.downstream_task.subject_representation — BioNeuralNet 1.0.4 documentation

# bioneuralnet.downstream_task.subject_representation

Functions

`generate_hidden_dims`(init_dim[, min_dim]) | Generates a list of hidden dimensions by halving the initial dimension until the minimum is reached.
`get_activation`(activation) | Maps a string to a PyTorch activation module.
`get_logger`(name) | Retrieves a global logger configured to write to 'bioneuralnet.log' at the project root.

Classes

`ASHAScheduler` | alias of `AsyncHyperBandScheduler`
`Any`(*args, **kwargs) | Special type indicating an unconstrained type.
`AutoEncoder`(*args, **kwargs) | Generic Autoencoder for configurable reduction.
`CLIReporter`(*[, metric_columns, ...]) | Command-line reporter
`Path`(*args, **kwargs) | PurePath subclass that can make system calls.
`SubjectRepresentation`(omics_data, embeddings) | SubjectRepresentation Class for Integrating Network Embeddings into Omics Data.
`datetime`(year, month, day[, hour[, minute[, ...) | The year, month and day arguments are required.

Exceptions

`TuneError` | General error class raised by ray.tune.

class bioneuralnet.downstream_task.subject_representation.AutoEncoder(*args: Any, **kwargs: Any)

  Bases: `Module`

  Generic Autoencoder for configurable reduction. Builds encoder and decoder layers based on a list of hidden dimensions. Allows tuning of dropout, activation, and network architecture.

  forward(x)

class bioneuralnet.downstream_task.subject_representation.SubjectRepresentation(omics_data: DataFrame, embeddings: DataFrame, phenotype_data: DataFrame | None = None, phenotype_col: str = 'phenotype', reduce_method: str = 'AE', seed: int | None = None, tune: bool | None = False, output_dir: str | None = None)

  Bases: `object`

  SubjectRepresentation Class for Integrating Network Embeddings into Omics Data.

  run() → DataFrame

    Executes the Subject Representation workflow. If tuning is enabled, runs hyperparameter tuning and uses the best config to reduce embeddings. Otherwise, uses the default reduction method. :returns:

    > - Enhanced omics data as a DataFrame.

bioneuralnet.downstream_task.subject_representation.generate_hidden_dims(init_dim: int, min_dim: int = 2) → List[int]

  Generates a list of hidden dimensions by halving the initial dimension until the minimum is reached. For example, if init_dim is 64, this returns [64, 32, 16, 8, 4, 2].

bioneuralnet.downstream_task.subject_representation.get_activation(activation: str)

  Maps a string to a PyTorch activation module.