Tabular ML (bookmark)

Supporting table-level modelling after a habitat FeatureTable. This is not the product core and is not a wall of classifiers on API Reference.

User guide: Table ML domain API. Composer: TablePipeline (documented on habit.pipeline: compose subject / table pipelines). Construct components with each domain registry’s create / constructor_signature (do not invent sklearn-shaped aliases). Image-side feature scaling is habit.feature_preprocessing: scale voxel-feature matrices.

Classes

habit.table_preprocessing.TablePreprocessor

Learn and apply a feature-table transformation.

habit.table_preprocessing.TablePreprocessorRegistry

Name-to-implementation registry for feature-table preprocessors.

habit.feature_selection.FeatureSelector

Learn and apply a feature-column subset.

habit.feature_selection.FeatureSelectorRegistry

Name-to-implementation registry for feature-table selectors.

habit.classification.Classifier

Outcome model over feature tables.

habit.classification.ClassifierRegistry

Name-to-implementation registry for outcome classifiers.

habit.evaluation.Metric

Evaluation metric with explicit input requirements.

habit.evaluation.MetricRegistry

Name-to-implementation registry for evaluation metrics.

habit.recipes.ModelResult

Outcome of train_model(), entirely in memory.

habit.recipes.CVResult

Outcome of cross_validate(), entirely in memory.

habit.recipes.PredictionResult

Outcome of predict_model(), entirely in memory.

habit.recipes.SearchResult

Outcome of search_hyperparameters(), entirely in memory.

Functions

Recipe helpers exported from habit.recipes:

habit.recipes.train_model

Fit one pipeline on a table and score it, with an optional hold-out split.

habit.recipes.cross_validate

Estimate generalisation with stratified K-fold cross-validation.

habit.recipes.predict_model

Apply one FITTED pipeline to new rows (the inference recipe).

habit.recipes.search_hyperparameters

Tune hyperparameters by K-fold search and write the winners into the spec.

habit.recipes.compare_models

Compare multiple trained models from a validated comparison config.

habit.recipes.pairwise_delong_test

Compare two models' ROC AUCs on the same subjects (paired DeLong test).

habit.plugins.create_ml_model

Build one ML model instance for config validation (habit check-config).

Evaluation statistics

habit.evaluation.auc_confidence_interval

Compute the ROC AUC and its DeLong confidence interval.

habit.evaluation.calibration_tests

Run both calibration tests HABIT reports for a binary model.

habit.evaluation.delong_test

Compare two models' ROC AUCs on the same subjects (paired DeLong test).

habit.evaluation.icc_analysis

Compute per-feature test-retest ICCs across measurement sessions.

habit.evaluation.repeat_measurement_matrix

Build one feature's (subjects x sessions) repeat-measurement matrix.

habit.evaluation.AucConfidenceInterval

ROC AUC with its DeLong confidence interval.

habit.evaluation.CalibrationResult

The two calibration test outcomes reported together for a model.

habit.evaluation.DelongResult

Outcome of a paired DeLong AUC comparison.