mofaflex.priors.InformedHorseshoe#

class mofaflex.priors.InformedHorseshoe(annotations_varm_key, annotation_confidence=0.99)#

Horseshoe prior with domain knowledge.

Important

This prior can only be used for weights.

Parameters:
  • annotations_varm_key (str | Mapping[str, str]) – Key in .varm for the feature set annotations.

  • annotation_confidence (float (default: 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.

Important

All methods and properties of this class are only accessible through the MofaFlex class.

Attributes table#

n_informed_factors

Number of informed factors.

Methods table#

get_annotations([ordered])

Annotation matrices for each view.

get_significant_annotations()

Get the results of significance testing of annotations against factors.

Attributes#

InformedHorseshoe.n_informed_factors#

Number of informed factors.

Methods#

InformedHorseshoe.get_annotations(ordered=False)#

Annotation matrices for each view.

Parameters:

ordered (bool (default: False)) – Whether to return the factors ordered by explained variance (highest to lowest).

Return type:

Mapping[str, DataFrame]

InformedHorseshoe.get_significant_annotations() Mapping[str, DataFrame]#

Get the results of significance testing of annotations against factors.

The significance testing is an implementation of PCGSE [FLM15]. While originally intended to assign annotations to uninformed factors, here it is used as a diagnostic plot to find factors that are mismatched to their annotations.

Returns:

PCGSE results for each view or None if the model does not have prior annotations.