cvanmf.models¶
Load existing Enterosignature models.
Attributes¶
Classes¶
Definition of an existing signature model. |
Functions¶
|
The 5 Enterosignature model of Frioux et al. |
Module Contents¶
- class cvanmf.models.Signatures[source]¶
Bases:
NamedTupleDefinition of an existing signature model.
This provides the definition of existing signatures required to reapply the signature model to new data. Where Decomposition stores the input and H matrix, these are not necessary for transforming new data. Rather, we only need the W matrix, the colors associated with each signature (for consistency of representation), and the preprocessing steps (to match features in the new data with those in the W matrix).
- reapply(y: pandas.DataFrame, **kwargs) Decomposition[source]¶
Transform new data using this signature model.
- Parameters:
y – New data of same type as the existing model.
- citation: str | None = None¶
Citation when using this model.
- colors: List[str] | Dict[str, str]¶
Color for each signature in the model.
- feature_match: FeatureMatch¶
Function to map features in new data to those in the model W matrix.
- input_validation: InputValidation¶
Function to validate and potentially transform input table. Defaults to identity function
- w: pandas.DataFrame¶
Feature weights (W matrix) for this model.
- cvanmf.models.five_es() Signatures[source]¶
The 5 Enterosignature model of Frioux et al. (2023, https://doi.org/10.1016/j.chom.2023.05.024). A summary of this model can also be found on the website https://enterosignatures.quadram.ac.uk. The reapply method for this model will normalise (total-sum-scale) input data after applying filters to match model format, so data provided does not need to be normalised.
- Returns:
5 Enterosignature model
- Type:
- cvanmf.models.FIVE_ES_COLORS¶
- cvanmf.models.logger: logging.Logger¶