coco_pipe.decoding.configs ========================== .. py:module:: coco_pipe.decoding.configs .. autoapi-nested-parse:: Decoding Configurations ======================= Comprehensive Pydantic models for strict validation of Decoding/ML experiments. These models ensure that all parameters are scientifically sound before any computation begins. Attributes ---------- .. autoapisummary:: coco_pipe.decoding.configs.AtomicEstimator coco_pipe.decoding.configs.EstimatorConfigType coco_pipe.decoding.configs.ClassicalModelType coco_pipe.decoding.configs.ModelConfigType Classes ------- .. autoapisummary:: coco_pipe.decoding.configs.BaseEstimatorConfig coco_pipe.decoding.configs.ClassicalEstimatorConfig coco_pipe.decoding.configs.LinearMixin coco_pipe.decoding.configs.RegularizedLinearMixin coco_pipe.decoding.configs.TreeMixin coco_pipe.decoding.configs.SupportVectorMixin coco_pipe.decoding.configs.SGDMixin coco_pipe.decoding.configs.MLPMixin coco_pipe.decoding.configs.GradientBoostingMixin coco_pipe.decoding.configs.LogisticRegressionConfig coco_pipe.decoding.configs.RandomForestClassifierConfig coco_pipe.decoding.configs.SVCConfig coco_pipe.decoding.configs.LinearSVCConfig coco_pipe.decoding.configs.KNeighborsClassifierConfig coco_pipe.decoding.configs.GradientBoostingClassifierConfig coco_pipe.decoding.configs.HistGradientBoostingClassifierConfig coco_pipe.decoding.configs.SGDClassifierConfig coco_pipe.decoding.configs.MLPClassifierConfig coco_pipe.decoding.configs.GaussianNBConfig coco_pipe.decoding.configs.LDAConfig coco_pipe.decoding.configs.AdaBoostClassifierConfig coco_pipe.decoding.configs.DummyClassifierConfig coco_pipe.decoding.configs.LPFTConfig coco_pipe.decoding.configs.SkorchClassifierConfig coco_pipe.decoding.configs.SlidingEstimatorConfig coco_pipe.decoding.configs.GeneralizingEstimatorConfig coco_pipe.decoding.configs.LinearRegressionConfig coco_pipe.decoding.configs.RidgeConfig coco_pipe.decoding.configs.LassoConfig coco_pipe.decoding.configs.ElasticNetConfig coco_pipe.decoding.configs.RandomForestRegressorConfig coco_pipe.decoding.configs.SVRConfig coco_pipe.decoding.configs.GradientBoostingRegressorConfig coco_pipe.decoding.configs.SGDRegressorConfig coco_pipe.decoding.configs.MLPRegressorConfig coco_pipe.decoding.configs.DummyRegressorConfig coco_pipe.decoding.configs.DecisionTreeRegressorConfig coco_pipe.decoding.configs.KNeighborsRegressorConfig coco_pipe.decoding.configs.ExtraTreesRegressorConfig coco_pipe.decoding.configs.HistGradientBoostingRegressorConfig coco_pipe.decoding.configs.AdaBoostRegressorConfig coco_pipe.decoding.configs.BayesianRidgeConfig coco_pipe.decoding.configs.ARDRegressionConfig coco_pipe.decoding.configs.ClassicalModelConfig coco_pipe.decoding.configs.FoundationEmbeddingModelConfig coco_pipe.decoding.configs.LoRAConfig coco_pipe.decoding.configs.QuantizationConfig coco_pipe.decoding.configs.DeviceConfig coco_pipe.decoding.configs.CheckpointConfig coco_pipe.decoding.configs.TrainerConfig coco_pipe.decoding.configs.FrozenBackboneDecoderConfig coco_pipe.decoding.configs.NeuralFineTuneConfig coco_pipe.decoding.configs.TemporalDecoderConfig coco_pipe.decoding.configs.CVConfig coco_pipe.decoding.configs.TuningConfig coco_pipe.decoding.configs.FeatureSelectionConfig coco_pipe.decoding.configs.ReducerConfig coco_pipe.decoding.configs.CalibrationConfig coco_pipe.decoding.configs.ConfidenceIntervalConfig coco_pipe.decoding.configs.ChanceAssessmentConfig coco_pipe.decoding.configs.StatisticalAssessmentConfig Module Contents --------------- .. py:class:: BaseEstimatorConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Base configuration for any estimator. .. py:class:: ClassicalEstimatorConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Base for scikit-learn compatible classical estimators. .. py:attribute:: kind :type: Literal['classical'] :value: 'classical' .. py:class:: LinearMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Common parameters for linear models. .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: n_jobs :type: int | None :value: None .. py:class:: RegularizedLinearMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Parameters for regularized linear models. .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: tol :type: float :value: 0.001 .. py:attribute:: max_iter :type: int | None :value: None .. py:attribute:: positive :type: bool :value: False .. py:attribute:: random_state :type: int | None :value: None .. py:class:: TreeMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Common parameters for Tree-based models. .. py:attribute:: n_estimators :type: int :value: None .. py:attribute:: max_depth :type: int | None :value: None .. py:attribute:: min_samples_split :type: int | float :value: 2 .. py:attribute:: min_samples_leaf :type: int | float :value: 1 .. py:attribute:: min_weight_fraction_leaf :type: float :value: 0.0 .. py:attribute:: max_features :type: str | int | float | None :value: 'sqrt' .. py:attribute:: max_leaf_nodes :type: int | None :value: None .. py:attribute:: min_impurity_decrease :type: float :value: 0.0 .. py:attribute:: ccp_alpha :type: float :value: 0.0 .. py:attribute:: n_jobs :type: int | None :value: None .. py:attribute:: random_state :type: int | None :value: None .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: warm_start :type: bool :value: False .. py:class:: SupportVectorMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Common parameters for Support Vector Machines. .. py:attribute:: C :type: float :value: None .. py:attribute:: kernel :type: Literal['linear', 'poly', 'rbf', 'sigmoid', 'precomputed'] :value: 'rbf' .. py:attribute:: degree :type: int :value: 3 .. py:attribute:: gamma :type: str | float :value: 'scale' .. py:attribute:: coef0 :type: float :value: 0.0 .. py:attribute:: tol :type: float :value: 0.001 .. py:attribute:: verbose :type: bool :value: False .. py:attribute:: max_iter :type: int :value: -1 .. py:attribute:: shrinking :type: bool :value: True .. py:attribute:: cache_size :type: float :value: 200 .. py:class:: SGDMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Stochastic Gradient Descent parameters. .. py:attribute:: loss :type: str :value: 'hinge' .. py:attribute:: penalty :type: Literal['l2', 'l1', 'elasticnet'] | None :value: 'l2' .. py:attribute:: alpha :type: float :value: 0.0001 .. py:attribute:: l1_ratio :type: float :value: 0.15 .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: max_iter :type: int :value: 1000 .. py:attribute:: tol :type: float :value: 0.001 .. py:attribute:: shuffle :type: bool :value: True .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: epsilon :type: float :value: 0.1 .. py:attribute:: learning_rate :type: str :value: 'optimal' .. py:attribute:: eta0 :type: float :value: 0.01 .. py:attribute:: power_t :type: float :value: 0.5 .. py:attribute:: early_stopping :type: bool :value: False .. py:class:: MLPMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Common parameters for Multi-layer Perceptron models. .. py:attribute:: hidden_layer_sizes :type: tuple :value: (100,) .. py:attribute:: activation :type: Literal['identity', 'logistic', 'tanh', 'relu'] :value: 'relu' .. py:attribute:: solver :type: Literal['lbfgs', 'sgd', 'adam'] :value: 'adam' .. py:attribute:: alpha :type: float :value: 0.0001 .. py:attribute:: batch_size :type: int | str :value: 'auto' .. py:attribute:: learning_rate :type: Literal['constant', 'invscaling', 'adaptive'] :value: 'constant' .. py:attribute:: learning_rate_init :type: float :value: 0.001 .. py:attribute:: power_t :type: float :value: 0.5 .. py:attribute:: max_iter :type: int :value: 200 .. py:attribute:: shuffle :type: bool :value: True .. py:attribute:: tol :type: float :value: 0.0001 .. py:attribute:: verbose :type: bool :value: False .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: momentum :type: float :value: 0.9 .. py:attribute:: nesterovs_momentum :type: bool :value: True .. py:attribute:: early_stopping :type: bool :value: False .. py:attribute:: validation_fraction :type: float :value: 0.1 .. py:attribute:: beta_1 :type: float :value: 0.9 .. py:attribute:: beta_2 :type: float :value: 0.999 .. py:attribute:: epsilon :type: float :value: 1e-08 .. py:attribute:: n_iter_no_change :type: int :value: 10 .. py:attribute:: max_fun :type: int :value: 15000 .. py:attribute:: random_state :type: int | None :value: None .. py:class:: GradientBoostingMixin(/, **data) Bases: :py:obj:`pydantic.BaseModel` Common parameters for Gradient Boosting models. .. py:attribute:: learning_rate :type: float :value: 0.1 .. py:attribute:: n_estimators :type: int :value: 100 .. py:attribute:: subsample :type: float :value: 1.0 .. py:attribute:: criterion :type: Literal['friedman_mse', 'squared_error'] :value: 'friedman_mse' .. py:attribute:: min_samples_split :type: int | float :value: 2 .. py:attribute:: min_samples_leaf :type: int | float :value: 1 .. py:attribute:: min_weight_fraction_leaf :type: float :value: 0.0 .. py:attribute:: max_depth :type: int :value: 3 .. py:attribute:: min_impurity_decrease :type: float :value: 0.0 .. py:attribute:: init :type: str | None :value: None .. py:attribute:: max_features :type: str | int | float | None :value: None .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: max_leaf_nodes :type: int | None :value: None .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: validation_fraction :type: float :value: 0.1 .. py:attribute:: n_iter_no_change :type: int :value: 5 .. py:attribute:: tol :type: float :value: 0.0001 .. py:attribute:: ccp_alpha :type: float :value: 0.0 .. py:attribute:: random_state :type: int | None :value: None .. py:class:: LogisticRegressionConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.linear_model.LogisticRegression. .. py:attribute:: method :type: Literal['LogisticRegression'] :value: 'LogisticRegression' .. py:attribute:: penalty :type: Literal['l1', 'l2', 'elasticnet', None] :value: 'l2' .. py:attribute:: dual :type: bool :value: False .. py:attribute:: tol :type: float :value: 0.0001 .. py:attribute:: C :type: float :value: None .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: intercept_scaling :type: float :value: 1.0 .. py:attribute:: class_weight :type: dict | str | None :value: None .. py:attribute:: solver :type: Literal['newton-cg', 'lbfgs', 'liblinear', 'sag', 'saga'] :value: 'lbfgs' .. py:attribute:: max_iter :type: int :value: 100 .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: n_jobs :type: int | None :value: None .. py:attribute:: l1_ratio :type: float | None :value: None .. py:attribute:: random_state :type: int | None :value: None .. py:class:: RandomForestClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`TreeMixin` Configuration for sklearn.ensemble.RandomForestClassifier. .. py:attribute:: method :type: Literal['RandomForestClassifier'] :value: 'RandomForestClassifier' .. py:attribute:: criterion :type: Literal['gini', 'entropy', 'log_loss'] :value: 'gini' .. py:attribute:: bootstrap :type: bool :value: True .. py:attribute:: oob_score :type: bool :value: False .. py:attribute:: class_weight :type: str | dict | list | None :value: None .. py:attribute:: max_samples :type: int | float | None :value: None .. py:class:: SVCConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`SupportVectorMixin` Configuration for sklearn.svm.SVC. .. py:attribute:: method :type: Literal['SVC'] :value: 'SVC' .. py:attribute:: probability :type: bool :value: True .. py:attribute:: class_weight :type: dict | str | None :value: None .. py:attribute:: decision_function_shape :type: Literal['ovo', 'ovr'] :value: 'ovr' .. py:attribute:: break_ties :type: bool :value: False .. py:attribute:: random_state :type: int | None :value: None .. py:class:: LinearSVCConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.svm.LinearSVC. .. py:attribute:: method :type: Literal['LinearSVC'] :value: 'LinearSVC' .. py:attribute:: penalty :type: Literal['l1', 'l2'] :value: 'l2' .. py:attribute:: loss :type: Literal['hinge', 'squared_hinge'] :value: 'squared_hinge' .. py:attribute:: dual :type: bool | Literal['auto'] :value: 'auto' .. py:attribute:: tol :type: float :value: 0.0001 .. py:attribute:: C :type: float :value: None .. py:attribute:: multi_class :type: Literal['ovr', 'crammer_singer'] :value: 'ovr' .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: intercept_scaling :type: float :value: 1.0 .. py:attribute:: class_weight :type: dict | str | None :value: None .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: max_iter :type: int :value: 1000 .. py:attribute:: random_state :type: int | None :value: None .. py:class:: KNeighborsClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.neighbors.KNeighborsClassifier. .. py:attribute:: method :type: Literal['KNeighborsClassifier'] :value: 'KNeighborsClassifier' .. py:attribute:: n_neighbors :type: int :value: None .. py:attribute:: weights :type: Literal['uniform', 'distance'] :value: 'uniform' .. py:attribute:: algorithm :type: Literal['auto', 'ball_tree', 'kd_tree', 'brute'] :value: 'auto' .. py:attribute:: leaf_size :type: int :value: 30 .. py:attribute:: p :type: int :value: 2 .. py:attribute:: metric :type: str :value: 'minkowski' .. py:attribute:: metric_params :type: dict | None :value: None .. py:attribute:: n_jobs :type: int | None :value: None .. py:class:: GradientBoostingClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`GradientBoostingMixin` Configuration for sklearn.ensemble.GradientBoostingClassifier. .. py:attribute:: method :type: Literal['GradientBoostingClassifier'] :value: 'GradientBoostingClassifier' .. py:attribute:: loss :type: Literal['log_loss', 'exponential'] :value: 'log_loss' .. py:class:: HistGradientBoostingClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.ensemble.HistGradientBoostingClassifier. .. py:attribute:: method :type: Literal['HistGradientBoostingClassifier'] :value: 'HistGradientBoostingClassifier' .. py:attribute:: learning_rate :type: float :value: 0.1 .. py:attribute:: max_iter :type: int :value: 100 .. py:attribute:: max_leaf_nodes :type: int :value: 31 .. py:attribute:: max_depth :type: int | None :value: None .. py:attribute:: min_samples_leaf :type: int :value: 20 .. py:attribute:: l2_regularization :type: float :value: 0.0 .. py:attribute:: max_bins :type: int :value: 255 .. py:attribute:: categorical_features :type: list[int] | list[str] | list[bool] | None :value: None .. py:attribute:: monotonic_cst :type: Any | None :value: None .. py:attribute:: interaction_cst :type: Any | None :value: None .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: early_stopping :type: bool | Literal['auto'] :value: 'auto' .. py:attribute:: scoring :type: str | None :value: 'loss' .. py:attribute:: validation_fraction :type: float :value: 0.1 .. py:attribute:: n_iter_no_change :type: int :value: 10 .. py:attribute:: tol :type: float :value: 1e-07 .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: random_state :type: int | None :value: None .. py:class:: SGDClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`SGDMixin` Configuration for sklearn.linear_model.SGDClassifier. .. py:attribute:: method :type: Literal['SGDClassifier'] :value: 'SGDClassifier' .. py:attribute:: class_weight :type: dict | str | None :value: None .. py:class:: MLPClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`MLPMixin` Configuration for sklearn.neural_network.MLPClassifier. .. py:attribute:: method :type: Literal['MLPClassifier'] :value: 'MLPClassifier' .. py:class:: GaussianNBConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.naive_bayes.GaussianNB. .. py:attribute:: method :type: Literal['GaussianNB'] :value: 'GaussianNB' .. py:attribute:: priors :type: list[float] | None :value: None .. py:attribute:: var_smoothing :type: float :value: 1e-09 .. py:class:: LDAConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.discriminant_analysis.LinearDiscriminantAnalysis. .. py:attribute:: method :type: Literal['LinearDiscriminantAnalysis'] :value: 'LinearDiscriminantAnalysis' .. py:attribute:: solver :type: Literal['svd', 'lsqr', 'eigen'] :value: 'svd' .. py:attribute:: shrinkage :type: str | float | None :value: None .. py:attribute:: priors :type: list[float] | None :value: None .. py:attribute:: n_components :type: int | None :value: None .. py:attribute:: store_covariance :type: bool :value: False .. py:attribute:: tol :type: float :value: 0.0001 .. py:class:: AdaBoostClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.ensemble.AdaBoostClassifier. .. py:attribute:: method :type: Literal['AdaBoostClassifier'] :value: 'AdaBoostClassifier' .. py:attribute:: n_estimators :type: int :value: 50 .. py:attribute:: learning_rate :type: float :value: 1.0 .. py:attribute:: random_state :type: int | None :value: None .. py:class:: DummyClassifierConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.dummy.DummyClassifier. .. py:attribute:: method :type: Literal['DummyClassifier'] :value: 'DummyClassifier' .. py:attribute:: strategy :type: Literal['stratified', 'most_frequent', 'prior', 'uniform'] :value: 'prior' .. py:attribute:: constant :type: Any | None :value: None .. py:attribute:: random_state :type: int | None :value: None .. py:class:: LPFTConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Configuration for Linear-Probe Fine-Tuning (LP-FT). Reference: Kumar et al. (2022). .. py:attribute:: method :type: Literal['LPFTClassifier'] :value: 'LPFTClassifier' .. py:attribute:: backbone_name :type: str :value: 'gpt2' .. py:attribute:: lp_lr :type: float :value: 0.001 .. py:attribute:: lp_epochs :type: int :value: 10 .. py:attribute:: ft_lr :type: float :value: 1e-05 .. py:attribute:: ft_epochs :type: int :value: 5 .. py:attribute:: batch_size :type: int :value: 32 .. py:attribute:: max_length :type: int :value: 128 .. py:attribute:: device :type: str :value: 'cpu' .. py:class:: SkorchClassifierConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Configuration for generic PyTorch wrappers via Skorch. .. py:attribute:: method :type: Literal['SkorchClassifier'] :value: 'SkorchClassifier' .. py:attribute:: module_name :type: str .. py:attribute:: max_epochs :type: int :value: 10 .. py:attribute:: lr :type: float :value: 0.01 .. py:attribute:: batch_size :type: int :value: 64 .. py:attribute:: optimizer :type: str :value: 'Adam' .. py:attribute:: device :type: str :value: 'cpu' .. py:class:: SlidingEstimatorConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Configuration for MNE-style SlidingEstimator. Fits a separate estimator for each time point. .. py:attribute:: method :type: Literal['SlidingEstimator'] :value: 'SlidingEstimator' .. py:attribute:: base_estimator :type: EstimatorConfigType .. py:attribute:: scoring :type: str | collections.abc.Callable | None :value: None .. py:attribute:: n_jobs :type: int | None :value: 1 .. py:attribute:: position :type: float | None :value: 0 .. py:attribute:: allow_2d :type: bool :value: False .. py:attribute:: verbose :type: bool | str | int | None :value: None .. py:class:: GeneralizingEstimatorConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Configuration for MNE-style GeneralizingEstimator. Fits an estimator on each time point and tests on all other time points. .. py:attribute:: method :type: Literal['GeneralizingEstimator'] :value: 'GeneralizingEstimator' .. py:attribute:: base_estimator :type: EstimatorConfigType .. py:attribute:: scoring :type: str | collections.abc.Callable | None :value: None .. py:attribute:: n_jobs :type: int | None :value: 1 .. py:attribute:: position :type: float | None :value: 0 .. py:attribute:: allow_2d :type: bool :value: False .. py:attribute:: verbose :type: bool | str | int | None :value: None .. py:class:: LinearRegressionConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`LinearMixin` Configuration for sklearn.linear_model.LinearRegression. .. py:attribute:: method :type: Literal['LinearRegression'] :value: 'LinearRegression' .. py:attribute:: positive :type: bool :value: False .. py:class:: RidgeConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`RegularizedLinearMixin` Configuration for sklearn.linear_model.Ridge. .. py:attribute:: method :type: Literal['Ridge'] :value: 'Ridge' .. py:attribute:: alpha :type: float :value: 1.0 .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: solver :type: str :value: 'auto' .. py:class:: LassoConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`RegularizedLinearMixin` Configuration for sklearn.linear_model.Lasso. .. py:attribute:: method :type: Literal['Lasso'] :value: 'Lasso' .. py:attribute:: alpha :type: float :value: 1.0 .. py:attribute:: precompute :type: bool | list :value: False .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: selection :type: Literal['cyclic', 'random'] :value: 'cyclic' .. py:attribute:: warm_start :type: bool :value: False .. py:class:: ElasticNetConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`RegularizedLinearMixin` Configuration for sklearn.linear_model.ElasticNet. .. py:attribute:: method :type: Literal['ElasticNet'] :value: 'ElasticNet' .. py:attribute:: alpha :type: float :value: 1.0 .. py:attribute:: l1_ratio :type: float :value: 0.5 .. py:attribute:: precompute :type: bool | list :value: False .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: selection :type: Literal['cyclic', 'random'] :value: 'cyclic' .. py:attribute:: warm_start :type: bool :value: False .. py:class:: RandomForestRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`TreeMixin` Configuration for sklearn.ensemble.RandomForestRegressor. .. py:attribute:: method :type: Literal['RandomForestRegressor'] :value: 'RandomForestRegressor' .. py:attribute:: criterion :type: Literal['squared_error', 'absolute_error', 'friedman_mse', 'poisson'] :value: 'squared_error' .. py:attribute:: bootstrap :type: bool :value: True .. py:attribute:: oob_score :type: bool :value: False .. py:attribute:: max_samples :type: int | float | None :value: None .. py:class:: SVRConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`SupportVectorMixin` Configuration for sklearn.svm.SVR. .. py:attribute:: method :type: Literal['SVR'] :value: 'SVR' .. py:attribute:: epsilon :type: float :value: 0.1 .. py:class:: GradientBoostingRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`GradientBoostingMixin` Configuration for sklearn.ensemble.GradientBoostingRegressor. .. py:attribute:: method :type: Literal['GradientBoostingRegressor'] :value: 'GradientBoostingRegressor' .. py:attribute:: loss :type: Literal['squared_error', 'absolute_error', 'huber', 'quantile'] :value: 'squared_error' .. py:attribute:: alpha :type: float :value: 0.9 .. py:class:: SGDRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`SGDMixin` Configuration for sklearn.linear_model.SGDRegressor. .. py:attribute:: method :type: Literal['SGDRegressor'] :value: 'SGDRegressor' .. py:attribute:: loss :type: str :value: 'squared_error' .. py:class:: MLPRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`MLPMixin` Configuration for sklearn.neural_network.MLPRegressor. .. py:attribute:: method :type: Literal['MLPRegressor'] :value: 'MLPRegressor' .. py:class:: DummyRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.dummy.DummyRegressor. .. py:attribute:: method :type: Literal['DummyRegressor'] :value: 'DummyRegressor' .. py:attribute:: strategy :type: Literal['mean', 'median', 'quantile', 'constant'] :value: 'mean' .. py:attribute:: constant :type: int | float | list | None :value: None .. py:attribute:: quantile :type: float | None :value: None .. py:class:: DecisionTreeRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.tree.DecisionTreeRegressor. .. py:attribute:: method :type: Literal['DecisionTreeRegressor'] :value: 'DecisionTreeRegressor' .. py:attribute:: criterion :type: Literal['squared_error', 'friedman_mse', 'absolute_error', 'poisson'] :value: 'squared_error' .. py:attribute:: splitter :type: Literal['best', 'random'] :value: 'best' .. py:attribute:: max_depth :type: int | None :value: None .. py:attribute:: min_samples_split :type: int | float :value: 2 .. py:attribute:: min_samples_leaf :type: int | float :value: 1 .. py:attribute:: min_weight_fraction_leaf :type: float :value: 0.0 .. py:attribute:: max_features :type: str | int | float | None :value: None .. py:attribute:: random_state :type: int | None :value: None .. py:attribute:: max_leaf_nodes :type: int | None :value: None .. py:attribute:: min_impurity_decrease :type: float :value: 0.0 .. py:attribute:: ccp_alpha :type: float :value: 0.0 .. py:class:: KNeighborsRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.neighbors.KNeighborsRegressor. .. py:attribute:: method :type: Literal['KNeighborsRegressor'] :value: 'KNeighborsRegressor' .. py:attribute:: n_neighbors :type: int :value: None .. py:attribute:: weights :type: Literal['uniform', 'distance'] :value: 'uniform' .. py:attribute:: algorithm :type: Literal['auto', 'ball_tree', 'kd_tree', 'brute'] :value: 'auto' .. py:attribute:: leaf_size :type: int :value: 30 .. py:attribute:: p :type: int :value: 2 .. py:attribute:: metric :type: str :value: 'minkowski' .. py:attribute:: metric_params :type: dict | None :value: None .. py:attribute:: n_jobs :type: int | None :value: None .. py:class:: ExtraTreesRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig`, :py:obj:`TreeMixin` Configuration for sklearn.ensemble.ExtraTreesRegressor. .. py:attribute:: method :type: Literal['ExtraTreesRegressor'] :value: 'ExtraTreesRegressor' .. py:attribute:: bootstrap :type: bool :value: False .. py:attribute:: oob_score :type: bool :value: False .. py:attribute:: max_samples :type: int | float | None :value: None .. py:class:: HistGradientBoostingRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.ensemble.HistGradientBoostingRegressor. .. py:attribute:: method :type: Literal['HistGradientBoostingRegressor'] :value: 'HistGradientBoostingRegressor' .. py:attribute:: loss :type: Literal['squared_error', 'absolute_error', 'poisson', 'quantile'] :value: 'squared_error' .. py:attribute:: learning_rate :type: float :value: 0.1 .. py:attribute:: max_iter :type: int :value: 100 .. py:attribute:: max_leaf_nodes :type: int :value: 31 .. py:attribute:: max_depth :type: int | None :value: None .. py:attribute:: min_samples_leaf :type: int :value: 20 .. py:attribute:: l2_regularization :type: float :value: 0.0 .. py:attribute:: max_bins :type: int :value: 255 .. py:attribute:: categorical_features :type: list[int] | list[str] | list[bool] | None :value: None .. py:attribute:: monotonic_cst :type: Any | None :value: None .. py:attribute:: interaction_cst :type: Any | None :value: None .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: early_stopping :type: bool | Literal['auto'] :value: 'auto' .. py:attribute:: scoring :type: str | None :value: 'loss' .. py:attribute:: validation_fraction :type: float :value: 0.1 .. py:attribute:: n_iter_no_change :type: int :value: 10 .. py:attribute:: tol :type: float :value: 1e-07 .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: random_state :type: int | None :value: None .. py:class:: AdaBoostRegressorConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.ensemble.AdaBoostRegressor. .. py:attribute:: method :type: Literal['AdaBoostRegressor'] :value: 'AdaBoostRegressor' .. py:attribute:: n_estimators :type: int :value: 50 .. py:attribute:: learning_rate :type: float :value: 1.0 .. py:attribute:: loss :type: Literal['linear', 'square', 'exponential'] :value: 'linear' .. py:attribute:: random_state :type: int | None :value: None .. py:class:: BayesianRidgeConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.linear_model.BayesianRidge. .. py:attribute:: method :type: Literal['BayesianRidge'] :value: 'BayesianRidge' .. py:attribute:: max_iter :type: int :value: 300 .. py:attribute:: tol :type: float :value: 0.001 .. py:attribute:: alpha_1 :type: float :value: 1e-06 .. py:attribute:: alpha_2 :type: float :value: 1e-06 .. py:attribute:: lambda_1 :type: float :value: 1e-06 .. py:attribute:: lambda_2 :type: float :value: 1e-06 .. py:attribute:: alpha_init :type: float | None :value: None .. py:attribute:: lambda_init :type: float | None :value: None .. py:attribute:: compute_score :type: bool :value: False .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: verbose :type: bool :value: False .. py:class:: ARDRegressionConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for sklearn.linear_model.ARDRegression. .. py:attribute:: method :type: Literal['ARDRegression'] :value: 'ARDRegression' .. py:attribute:: max_iter :type: int :value: 300 .. py:attribute:: tol :type: float :value: 0.001 .. py:attribute:: alpha_1 :type: float :value: 1e-06 .. py:attribute:: alpha_2 :type: float :value: 1e-06 .. py:attribute:: lambda_1 :type: float :value: 1e-06 .. py:attribute:: lambda_2 :type: float :value: 1e-06 .. py:attribute:: compute_score :type: bool :value: False .. py:attribute:: threshold_lambda :type: float :value: 10000.0 .. py:attribute:: fit_intercept :type: bool :value: True .. py:attribute:: copy_X :type: bool :value: True .. py:attribute:: verbose :type: bool :value: False .. py:class:: ClassicalModelConfig(/, **data) Bases: :py:obj:`ClassicalEstimatorConfig` Configuration for standard scikit-learn estimators. .. py:attribute:: method :type: Literal['ClassicalModel'] :value: 'ClassicalModel' .. py:attribute:: estimator :type: str .. py:attribute:: params :type: dict[str, Any] :value: None .. py:attribute:: input_kind :type: Literal['tabular', 'embeddings'] :value: 'tabular' .. py:class:: FoundationEmbeddingModelConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Configuration for pretrained feature extraction backbones. .. py:attribute:: kind :type: Literal['foundation_embedding'] :value: 'foundation_embedding' .. py:attribute:: backend :type: str :value: 'auto' .. py:attribute:: n_outputs :type: int | None :value: None .. py:attribute:: train_mode :type: Literal['frozen', 'full', 'lora', 'qlora'] :value: 'frozen' .. py:attribute:: pooling :type: Literal['mean', 'flatten'] :value: 'mean' .. py:attribute:: normalize_embeddings :type: bool :value: True .. py:attribute:: cache_embeddings :type: bool :value: True .. py:attribute:: sfreq :type: float | None :value: None .. py:attribute:: ch_names :type: list[str] | None :value: None .. py:attribute:: backend_kwargs :type: dict[str, Any] :value: None .. py:class:: LoRAConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Low-Rank Adaptation (LoRA) configuration. .. py:attribute:: r :type: int :value: None .. py:attribute:: alpha :type: int :value: None .. py:attribute:: dropout :type: float :value: None .. py:attribute:: target_modules :type: str | list[str] :value: 'all-linear' .. py:class:: QuantizationConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Model quantization settings. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: load_in_4bit :type: bool :value: True .. py:attribute:: quant_type :type: Literal['nf4', 'fp4'] :value: 'nf4' .. py:attribute:: compute_dtype :type: Literal['bf16', 'fp16', 'fp32'] :value: 'bf16' .. py:class:: DeviceConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Compute device and precision policy. .. py:attribute:: device :type: Literal['auto', 'cpu', 'cuda', 'mps'] :value: 'auto' .. py:attribute:: precision :type: Literal['fp32', 'fp16', 'bf16'] :value: 'fp32' .. py:class:: CheckpointConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Neural training checkpoint policy. .. py:attribute:: save :type: Literal['none', 'best', 'last', 'all'] :value: 'best' .. py:attribute:: monitor :type: str :value: 'val_loss' .. py:attribute:: output_dir :type: pathlib.Path | None :value: None .. py:class:: TrainerConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Neural training loop configuration. .. py:attribute:: max_epochs :type: int :value: None .. py:attribute:: early_stopping_patience :type: int | None :value: None .. py:attribute:: batch_size :type: int :value: None .. py:attribute:: validation_fraction :type: float :value: None .. py:class:: FrozenBackboneDecoderConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Config for a frozen backbone followed by a classical decoding head. .. py:attribute:: kind :type: Literal['frozen_backbone'] :value: 'frozen_backbone' .. py:attribute:: backbone :type: FoundationEmbeddingModelConfig .. py:attribute:: head :type: ClassicalModelConfig .. py:class:: NeuralFineTuneConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Configuration for end-to-end neural fine-tuning. .. py:attribute:: kind :type: Literal['neural_finetune'] :value: 'neural_finetune' .. py:attribute:: backend :type: str :value: 'auto' .. py:attribute:: n_outputs :type: int | None :value: None .. py:attribute:: input_kind :type: Literal['temporal', 'epoched', 'tokens'] :value: 'epoched' .. py:attribute:: train_mode :type: Literal['full', 'frozen', 'linear_probe', 'lora', 'qlora'] :value: 'full' .. py:attribute:: optimizer :type: dict[str, Any] :value: None .. py:attribute:: trainer :type: TrainerConfig :value: None .. py:attribute:: device :type: DeviceConfig :value: None .. py:attribute:: checkpoints :type: CheckpointConfig :value: None .. py:attribute:: lora :type: LoRAConfig | None :value: None .. py:attribute:: quantization :type: QuantizationConfig | None :value: None .. py:attribute:: sfreq :type: float | None :value: None .. py:attribute:: ch_names :type: list[str] | None :value: None .. py:attribute:: backend_kwargs :type: dict[str, Any] :value: None .. py:attribute:: class_weight :type: str | dict[Any, float] | None :value: 'balanced' .. py:class:: TemporalDecoderConfig(/, **data) Bases: :py:obj:`BaseEstimatorConfig` Config for MNE-style temporal meta-estimators. .. py:attribute:: kind :type: Literal['temporal'] :value: 'temporal' .. py:attribute:: wrapper :type: Literal['sliding', 'generalizing'] :value: 'sliding' .. py:attribute:: base :type: ClassicalModelConfig .. py:attribute:: scoring :type: str | collections.abc.Callable | None :value: None .. py:attribute:: n_jobs :type: int | None :value: 1 .. py:attribute:: position :type: float | None :value: 0 .. py:attribute:: allow_2d :type: bool :value: False .. py:attribute:: verbose :type: bool | str | int | None :value: None .. py:data:: AtomicEstimator .. py:data:: EstimatorConfigType .. py:data:: ClassicalModelType .. py:class:: CVConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Cross-validation configuration settings. :param strategy: The splitting strategy. Note that 'stratified' strategies require classification tasks. :type strategy: str, default="stratified" :param n_splits: Number of folds. Must be at least 2. :type n_splits: int, default=5 :param shuffle: Whether to shuffle data before splitting. :type shuffle: bool, default=True :param random_state: Random seed for the splitter. :type random_state: int, default=42 :param test_size: The proportion of the dataset to include in the test split for strategy='split'. :type test_size: float, default=0.2 :param stratify: Whether to use stratified sampling for strategy='split'. :type stratify: bool, default=False :param group_key: The column name in sample_metadata to use for group-aware strategies. :type group_key: str, optional .. py:attribute:: strategy :type: Literal['stratified', 'kfold', 'group_kfold', 'stratified_group_kfold', 'leave_p_out', 'leave_one_group_out', 'timeseries', 'split', 'group_shuffle_split'] :value: 'stratified' .. py:attribute:: n_splits :type: int :value: None .. py:attribute:: shuffle :type: bool :value: True .. py:attribute:: random_state :type: int :value: 42 .. py:attribute:: test_size :type: float :value: None .. py:attribute:: stratify :type: bool :value: None .. py:attribute:: group_key :type: str | None :value: None .. py:attribute:: auto_reduce_n_splits :type: bool :value: None .. py:class:: TuningConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Hyperparameter Tuning Configuration. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: search_type :type: Literal['grid', 'random'] :value: 'grid' .. py:attribute:: n_iter :type: int :value: None .. py:attribute:: scoring :type: str | None :value: None .. py:attribute:: n_jobs :type: int :value: -1 .. py:attribute:: random_state :type: int | None :value: None .. py:attribute:: cv :type: CVConfig | None :value: None .. py:attribute:: allow_nongroup_inner_cv :type: bool :value: None .. py:class:: FeatureSelectionConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Feature selection settings. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: method :type: Literal['k_best', 'sfs'] :value: 'sfs' .. py:attribute:: n_features :type: int | None :value: None .. py:attribute:: direction :type: Literal['forward', 'backward'] :value: 'forward' .. py:attribute:: tol :type: float | None :value: None .. py:attribute:: cv :type: CVConfig | None :value: None .. py:attribute:: scoring :type: str | None :value: None .. py:attribute:: allow_nongroup_inner_cv :type: bool :value: None .. py:class:: ReducerConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Fold-local dimensionality reduction for classical decoding. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: method :type: Literal['pca'] :value: 'pca' .. py:attribute:: n_components :type: int | float | None :value: None .. py:attribute:: whiten :type: bool :value: False .. py:attribute:: svd_solver :type: Literal['auto', 'full', 'covariance_eigh', 'arpack', 'randomized'] :value: 'auto' .. py:attribute:: random_state :type: int | None :value: 42 .. py:class:: CalibrationConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Probability calibration settings for classification estimators. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: method :type: Literal['sigmoid', 'isotonic'] :value: 'sigmoid' .. py:attribute:: cv :type: CVConfig | None :value: None .. py:attribute:: n_jobs :type: int | None :value: None .. py:attribute:: allow_nongroup_inner_cv :type: bool :value: None .. py:class:: ConfidenceIntervalConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Analytical confidence interval settings. .. py:attribute:: alpha :type: float :value: None .. py:attribute:: method :type: Literal['wilson', 'clopper_pearson'] :value: 'wilson' .. py:class:: ChanceAssessmentConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Null-hypothesis (chance level) assessment settings. .. py:attribute:: method :type: Literal['permutation', 'binomial', 'auto'] :value: 'permutation' .. py:attribute:: n_permutations :type: int :value: None .. py:attribute:: p0 :type: float | Literal['auto'] | None :value: None .. py:attribute:: temporal_correction :type: Literal['max_stat', 'fdr_bh', 'none'] :value: None .. py:attribute:: store_null_distribution :type: bool :value: False .. py:class:: StatisticalAssessmentConfig(/, **data) Bases: :py:obj:`pydantic.BaseModel` Settings for finite-sample statistical inference and uncertainty estimation. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: random_state :type: int | None :value: 42 .. py:attribute:: metrics :type: list[str] | None :value: None .. py:attribute:: chance :type: ChanceAssessmentConfig :value: None .. py:attribute:: confidence_intervals :type: ConfidenceIntervalConfig :value: None .. py:attribute:: unit_of_inference :type: Literal['sample', 'group_mean', 'group_majority', 'custom'] | None :value: None .. py:attribute:: custom_unit_column :type: str | None :value: None .. py:attribute:: custom_aggregation :type: Literal['mean', 'majority'] :value: 'mean' .. py:data:: ModelConfigType