mofaflex.ModelOptions#

class mofaflex.ModelOptions(*, n_factors=0, weight_prior='Normal', factor_prior='Normal', likelihoods=None, nonnegative_weights=False, guiding_vars_likelihoods='Normal', guiding_vars_scales=1.0, nonnegative_factors=False, annotation_confidence=0.99, init_factors='random', init_scale=0.1)#

Options for the model.

Attributes table#

annotation_confidence

Confidence in the provided feature annotation.

factor_prior

Factor priors for each group (if dict) or for all groups (if str).

guiding_vars_likelihoods

Likelihood for each guiding variable (if dict) or for all guiding variables (if str).

guiding_vars_scales

Scale for the likelihood of each guiding variable, to put more or less emphasis on them during training.

init_factors

Initialization method for factors.

init_scale

Initialization scale of Normal distribution for factors.

likelihoods

Data likelihoods for each view (if dict) or for all views (if str).

n_factors

Number of latent factors.

nonnegative_factors

Non-negativity constraints for factors for each group (if dict) or for all groups (if bool).

nonnegative_weights

Non-negativity constraints for weights for each view (if dict) or for all views (if bool).

weight_prior

Weight priors for each view (if dict) or for all views (if str).

Methods table#

Attributes#

ModelOptions.annotation_confidence: float = 0.99#

Confidence in the provided feature annotation. Must be between 0 and 1. Smaller values make the model more likely to add features to the annotated pathways during training, while larger values encourage the model to more closely adhere to the provided annotations.

ModelOptions.factor_prior: Mapping[str, Literal['GP', 'Horseshoe', 'Normal', 'Laplace', 'SnS']] | Literal['GP', 'Horseshoe', 'Normal', 'Laplace', 'SnS'] = 'Normal'#

Factor priors for each group (if dict) or for all groups (if str).

ModelOptions.guiding_vars_likelihoods: Mapping[str, str] | Literal['Normal', 'Categorical', 'Bernoulli'] | None = 'Normal'#

Likelihood for each guiding variable (if dict) or for all guiding variables (if str).

ModelOptions.guiding_vars_scales: Mapping[str, float] | float = 1.0#

Scale for the likelihood of each guiding variable, to put more or less emphasis on them during training.

ModelOptions.init_factors: float | Literal['random', 'orthogonal', 'pca'] = 'random'#

Initialization method for factors.

ModelOptions.init_scale: float = 0.1#

Initialization scale of Normal distribution for factors.

ModelOptions.likelihoods: Mapping[str, Literal['Bernoulli', 'NegativeBinomial', 'Normal']] | Literal['Bernoulli', 'NegativeBinomial', 'Normal'] | None = None#

Data likelihoods for each view (if dict) or for all views (if str). Inferred automatically if None.

ModelOptions.n_factors: int = 0#

Number of latent factors.

ModelOptions.nonnegative_factors: Mapping[str, bool] | bool = False#

Non-negativity constraints for factors for each group (if dict) or for all groups (if bool).

ModelOptions.nonnegative_weights: Mapping[str, bool] | bool = False#

Non-negativity constraints for weights for each view (if dict) or for all views (if bool).

ModelOptions.weight_prior: Mapping[str, Literal['Horseshoe', 'Normal', 'Laplace', 'SnS']] | Literal['Horseshoe', 'Normal', 'Laplace', 'SnS'] = 'Normal'#

Weight priors for each view (if dict) or for all views (if str).

Methods#