Skip to Content
Ensembles and multimodal

Ensembles and multimodal analysis

mll.Ensemble controls candidate construction and aggregation.

ENSEMBLE = mll.Ensemble( max_sizes=(3,), selection_strategies=( "top_k", "best_per_resolution", "best_per_learner_type", "caruana", "super_learner", ), aggregation_strategies=( "mean_proba", "weighted_mean_proba", "median_proba", ), optimize_metric="log_loss", )

Selection is based on inner or training-side out-of-fold evidence. Outer-test performance does not choose MPMA-E.

Multimodal data

For multimodal analyses, define one sample table and one or more modalities.

SAMPLES = mll.Samples( path="samples.tsv", sample_id_col="sample_id", target_col="label", group_col="participant_id", ) MODALITIES = ( mll.Modality( name="microbiome", path="microbiome.tsv", format="table", primary=True, sample_id_col="sample_id", feature_prefixes=("g__", "s__"), ), mll.Modality( name="clinical", path="clinical.tsv", format="table", sample_id_col="sample_id", feature_cols=("age", "bmi"), ), )

Feature columns should be declared explicitly for general tabular modalities unless the table has been verified to contain only features.

Integration strategies

mll.Integration supports several stages of multimodal integration:

StageExamples
Unimodalevaluate one modality independently
Earlyconcatenate modality features
Intermediatemodality-specific PCA or joint PCA before modelling
Latecombine modality predictions, including weighted or Super Learner strategies

Example:

INTEGRATIONS = ( mll.Integration("unimodal"), mll.Integration("early_concat"), mll.Integration("intermediate_modality_pca", n_components=(5, 10)), mll.Integration("late_weighted_mean_proba"), )

Integration models that learn a representation are fitted within the corresponding training partition.

Last updated on