scvi.model.SCVI.load_query_data

classmethod SCVI.load_query_data(adata, reference_model, inplace_subset_query_vars=False, use_gpu=None, unfrozen=False, freeze_dropout=False, freeze_expression=True, freeze_decoder_first_layer=True, freeze_batchnorm_encoder=True, freeze_batchnorm_decoder=False, freeze_classifier=True)

Online update of a reference model with scArches algorithm [Lotfollahi20].

Parameters
adata : AnnDataAnnData

AnnData organized in the same way as data used to train model. It is not necessary to run setup_anndata(), as AnnData is validated against the saved scvi setup dictionary.

reference_model : str | BaseModelClassUnion[str, BaseModelClass]

Either an already instantiated model of the same class, or a path to saved outputs for reference model.

inplace_subset_query_vars : boolbool (default: False)

Whether to subset and rearrange query vars inplace based on vars used to train reference model.

use_gpu : str | int | bool | NoneUnion[str, int, bool, None] (default: None)

Load model on default GPU if available (if None or True), or index of GPU to use (if int), or name of GPU (if str), or use CPU (if False).

unfrozen : boolbool (default: False)

Override all other freeze options for a fully unfrozen model

freeze_dropout : boolbool (default: False)

Whether to freeze dropout during training

freeze_expression : boolbool (default: True)

Freeze neurons corersponding to expression in first layer

freeze_decoder_first_layer : boolbool (default: True)

Freeze neurons corersponding to first layer in decoder

freeze_batchnorm_encoder : boolbool (default: True)

Whether to freeze batchnorm weight and bias during training for encoder

freeze_batchnorm_decoder : boolbool (default: False)

Whether to freeze batchnorm weight and bias during training for decoder

freeze_classifier : boolbool (default: True)

Whether to freeze classifier completely. Only applies to SCANVI.