coco_pipe.decoding.ExperimentConfig#
- class coco_pipe.decoding.ExperimentConfig(*, task='classification', output_dir=None, tag='experiment', random_state=None, models, grids=None, cv=<factory>, tuning=<factory>, feature_selection=<factory>, reducer=<factory>, calibration=<factory>, statistical_assessment=<factory>, metrics=<factory>, use_scaler=True, n_jobs=-1, verbose=True)#
Bases:
BaseModelMaster configuration for a Decoding Experiment.
This model serves as the single source of truth for an entire analysis, including data handling, model selection, hyperparameter tuning, feature selection, and statistical inference.
- Parameters:
data (Any)
task (Literal['classification', 'regression'])
output_dir (Path | None)
tag (str)
random_state (int | None)
models (dict[str, Annotated[Annotated[ClassicalModelConfig | LogisticRegressionConfig | RandomForestClassifierConfig | SVCConfig | LinearSVCConfig | KNeighborsClassifierConfig | GradientBoostingClassifierConfig | HistGradientBoostingClassifierConfig | SGDClassifierConfig | MLPClassifierConfig | GaussianNBConfig | LDAConfig | AdaBoostClassifierConfig | DummyClassifierConfig | LinearRegressionConfig | RidgeConfig | LassoConfig | ElasticNetConfig | RandomForestRegressorConfig | SVRConfig | GradientBoostingRegressorConfig | SGDRegressorConfig | MLPRegressorConfig | DummyRegressorConfig | DecisionTreeRegressorConfig | KNeighborsRegressorConfig | ExtraTreesRegressorConfig | HistGradientBoostingRegressorConfig | AdaBoostRegressorConfig | BayesianRidgeConfig | ARDRegressionConfig, FieldInfo(annotation=NoneType, required=True, discriminator='method')] | FoundationEmbeddingModelConfig | FrozenBackboneDecoderConfig | NeuralFineTuneConfig | TemporalDecoderConfig, FieldInfo(annotation=NoneType, required=True, discriminator='kind')]])
cv (CVConfig)
tuning (TuningConfig)
feature_selection (FeatureSelectionConfig)
reducer (ReducerConfig)
calibration (CalibrationConfig)
statistical_assessment (StatisticalAssessmentConfig)
n_jobs (int)
verbose (bool)
- task: MetricTask#
- models: dict[str, ModelConfigType]#
- tuning: TuningConfig#
- feature_selection: FeatureSelectionConfig#
- reducer: ReducerConfig#
- calibration: CalibrationConfig#
- statistical_assessment: StatisticalAssessmentConfig#
- get_all_evaluation_metrics()#
Union of primary experiment metrics and stats-specific metrics.
- __hash__ = None#
- copy(*, include=None, exclude=None, update=None, deep=False)#
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to include in the copied model.
exclude (AbstractSetIntStr | MappingIntStrAny | None) – Optional set or mapping specifying which fields to exclude in the copied model.
update (Dict[str, Any] | None) – Optional dictionary of field-value pairs to override field values in the copied model.
deep (bool) – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- Return type:
Self
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)#
Examples using coco_pipe.decoding.ExperimentConfig#
Basic Decoding: Classification and Model Verification