scvi.external.methylvi.METHYLANVAE#
- class scvi.external.methylvi.METHYLANVAE(n_input, contexts, num_features_per_context, n_batch=0, n_cats_per_cov=None, n_labels=0, n_hidden=128, n_latent=10, n_layers=1, dropout_rate=0.1, likelihood='betabinomial', dispersion='region', y_prior=None, labels_groups=None, use_labels_groups=False, linear_classifier=False, classifier_parameters=None, use_batch_norm='both', use_layer_norm='none', **model_kwargs)[source]#
Bases:
SupervisedModuleClass
,METHYLVAE
,BSSeqModuleMixin
Methylation annotation using variational inference.
This is an implementation of the MethylANVI model described in [Weinberger and Lee, 2023].
- Parameters:
n_input (
int
) – Number of input genesn_batch (
int
(default:0
)) – Number of batchesn_labels (
int
(default:0
)) – Number of labelsn_hidden (
int
(default:128
)) – Number of nodes per hidden layern_latent (
int
(default:10
)) – Dimensionality of the latent spacen_layers (
int
(default:1
)) – Number of hidden layers used for encoder and decoder NNsn_continuous_cov – Number of continuous covarites
n_cats_per_cov (
Iterable
[int
] |None
(default:None
)) – Number of categories for each extra categorical covariatedropout_rate (
float
(default:0.1
)) – Dropout rate for neural networkslikelihood (
Literal
['betabinomial'
,'binomial'
] (default:'betabinomial'
)) – One of *'betabinomial'
- BetaBinomial distribution *'binomial'
- Binomial distributiondispersion (
Literal
['region'
,'region-cell'
] (default:'region'
)) – One of the following *'region'
- dispersion parameter of BetaBinomial is constant per region across cells *'region-cell'
- dispersion can differ for every region in every celly_prior (default:
None
) – If None, initialized to uniform probability over cell typeslabels_groups (
Sequence
[int
] (default:None
)) – Label group designationsuse_labels_groups (
bool
(default:False
)) – Whether to use the label groupslinear_classifier (
bool
(default:False
)) – If True, uses a single linear layer for classification instead of a multi-layer perceptron.classifier_parameters (
dict
|None
(default:None
)) – Keyword arguments passed intoClassifier
.use_batch_norm (
Literal
['encoder'
,'decoder'
,'none'
,'both'
] (default:'both'
)) – Whether to use batch norm in layersuse_layer_norm (
Literal
['encoder'
,'decoder'
,'none'
,'both'
] (default:'none'
)) – Whether to use layer norm in layerslinear_classifier – If
True
, uses a single linear layer for classification instead of a multi-layer perceptron.**model_kwargs – Keyword args for
METHYLVAE
Attributes table#
Methods table#
Attributes#
- METHYLANVAE.training: bool#