coco_pipe.decoding.configs¶
Comprehensive Pydantic models for strict validation of Decoding/ML experiments.
Key Components: - ModelConfigs: extensive hyperparameters for each estimator. - ExperimentConfig: Top-level configuration for the entire analysis workflow.
Attributes¶
Classes¶
Base configuration for any estimator. |
|
Common parameters for linear models. |
|
Parameters for regularized linear models. |
|
Common parameters for Tree-based models. |
|
Common parameters for Support Vector Machines. |
|
!!! abstract "Usage Documentation" |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Configuration for Linear-Probe Fine-Tuning (LP-FT). |
|
Configuration for generic PyTorch wrappers via Skorch. |
|
Configuration for MNE's SlidingEstimator. |
|
Configuration for MNE's GeneralizingEstimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Base configuration for any estimator. |
|
Configuration for temporal decoding (Sliding/Generalizing). |
|
Cross-validation settings. |
|
Hyperparameter Tuning Configuration. |
|
Configuration for Sequential Feature Selection. |
|
Master configuration for a Decoding Experiment. |
Module Contents¶
- class coco_pipe.decoding.configs.BaseEstimatorConfig(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelBase configuration for any estimator.
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- random_state: int | None = None¶
- class coco_pipe.decoding.configs.LinearMixin(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelCommon parameters for linear models.
- fit_intercept: bool = True¶
- copy_X: bool = True¶
- n_jobs: int | None = None¶
- class coco_pipe.decoding.configs.RegularizedLinearMixin(/, **data: Any)[source]¶
Bases:
LinearMixinParameters for regularized linear models.
- tol: float = 0.001¶
- max_iter: int | None = None¶
- solver: str = 'auto'¶
- warm_start: bool = False¶
- positive: bool = False¶
- class coco_pipe.decoding.configs.TreeMixin(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelCommon parameters for Tree-based models.
- n_estimators: int = None¶
- max_depth: int | None = None¶
- min_samples_split: int | float = 2¶
- min_samples_leaf: int | float = 1¶
- min_weight_fraction_leaf: float = 0.0¶
- max_features: str | int | float | None = 'sqrt'¶
- max_leaf_nodes: int | None = None¶
- min_impurity_decrease: float = 0.0¶
- ccp_alpha: float = 0.0¶
- n_jobs: int | None = None¶
- verbose: int = 0¶
- warm_start: bool = False¶
- class coco_pipe.decoding.configs.SupportVectorMixin(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelCommon parameters for Support Vector Machines.
- C: float = None¶
- kernel: Literal['linear', 'poly', 'rbf', 'sigmoid', 'precomputed'] = 'rbf'¶
- degree: int = 3¶
- gamma: str | float = 'scale'¶
- coef0: float = 0.0¶
- tol: float = 0.001¶
- verbose: bool = False¶
- max_iter: int = -1¶
- shrinking: bool = True¶
- cache_size: float = 200¶
- class coco_pipe.decoding.configs.SGDMixin(/, **data: Any)[source]¶
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__¶
The names of the class variables defined on the model.
- __private_attributes__¶
Metadata about the private attributes of the model.
- __signature__¶
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__¶
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__¶
The core schema of the model.
- __pydantic_custom_init__¶
Whether the model has a custom __init__ function.
- __pydantic_decorators__¶
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__¶
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__¶
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__¶
The name of the post-init method for the model, if defined.
- __pydantic_root_model__¶
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__¶
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__¶
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__¶
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__¶
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__¶
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__¶
The names of fields explicitly set during instantiation.
- __pydantic_private__¶
Values of private attributes set on the model instance.
- loss: str = 'hinge'¶
- penalty: Literal['l2', 'l1', 'elasticnet', 'null'] = 'l2'¶
- alpha: float = 0.0001¶
- l1_ratio: float = 0.15¶
- fit_intercept: bool = True¶
- max_iter: int = 1000¶
- tol: float = 0.001¶
- shuffle: bool = True¶
- verbose: int = 0¶
- epsilon: float = 0.1¶
- n_jobs: int | None = None¶
- learning_rate: str = 'optimal'¶
- eta0: float = 0.0¶
- power_t: float = 0.5¶
- early_stopping: bool = False¶
- validation_fraction: float = 0.1¶
- n_iter_no_change: int = 5¶
- warm_start: bool = False¶
- average: bool = False¶
- class coco_pipe.decoding.configs.LogisticRegressionConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['LogisticRegression'] = 'LogisticRegression'¶
- penalty: Literal['l1', 'l2', 'elasticnet', 'none', None] = 'l2'¶
- dual: bool = False¶
- tol: float = 0.0001¶
- C: float = None¶
- fit_intercept: bool = True¶
- intercept_scaling: float = 1.0¶
- class_weight: Dict | str | None = None¶
- solver: Literal['newton-cg', 'lbfgs', 'liblinear', 'sag', 'saga'] = 'lbfgs'¶
- max_iter: int = 100¶
- multiclass: Literal['auto', 'ovr', 'multinomial'] = 'auto'¶
- verbose: int = 0¶
- warm_start: bool = False¶
- n_jobs: int | None = None¶
- l1_ratio: float | None = None¶
- class coco_pipe.decoding.configs.RandomForestClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,TreeMixinBase configuration for any estimator.
- method: Literal['RandomForestClassifier'] = 'RandomForestClassifier'¶
- criterion: Literal['gini', 'entropy', 'log_loss'] = 'gini'¶
- bootstrap: bool = True¶
- oob_score: bool = False¶
- class_weight: str | Dict | List | None = None¶
- max_samples: int | float | None = None¶
- class coco_pipe.decoding.configs.SVCConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,SupportVectorMixinBase configuration for any estimator.
- method: Literal['SVC'] = 'SVC'¶
- probability: bool = True¶
- class_weight: Dict | str | None = None¶
- decision_function_shape: Literal['ovo', 'ovr'] = 'ovr'¶
- break_ties: bool = False¶
- class coco_pipe.decoding.configs.KNeighborsClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['KNeighborsClassifier'] = 'KNeighborsClassifier'¶
- n_neighbors: int = None¶
- weights: Literal['uniform', 'distance'] = 'uniform'¶
- algorithm: Literal['auto', 'ball_tree', 'kd_tree', 'brute'] = 'auto'¶
- leaf_size: int = 30¶
- p: int = 2¶
- metric: str = 'minkowski'¶
- metric_params: Dict | None = None¶
- n_jobs: int | None = None¶
- class coco_pipe.decoding.configs.GradientBoostingClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['GradientBoostingClassifier'] = 'GradientBoostingClassifier'¶
- loss: Literal['log_loss', 'exponential'] = 'log_loss'¶
- learning_rate: float = 0.1¶
- n_estimators: int = 100¶
- subsample: float = 1.0¶
- criterion: Literal['friedman_mse', 'squared_error'] = 'friedman_mse'¶
- min_samples_split: int | float = 2¶
- min_samples_leaf: int | float = 1¶
- min_weight_fraction_leaf: float = 0.0¶
- max_depth: int = 3¶
- min_impurity_decrease: float = 0.0¶
- init: str | None = None¶
- max_features: str | int | float | None = None¶
- verbose: int = 0¶
- max_leaf_nodes: int | None = None¶
- warm_start: bool = False¶
- validation_fraction: float = 0.1¶
- n_iter_no_change: int | None = None¶
- tol: float = 0.0001¶
- ccp_alpha: float = 0.0¶
- class coco_pipe.decoding.configs.SGDClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,SGDMixinBase configuration for any estimator.
- method: Literal['SGDClassifier'] = 'SGDClassifier'¶
- class_weight: Dict | str | None = None¶
- class coco_pipe.decoding.configs.MLPClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['MLPClassifier'] = 'MLPClassifier'¶
- activation: Literal['identity', 'logistic', 'tanh', 'relu'] = 'relu'¶
- solver: Literal['lbfgs', 'sgd', 'adam'] = 'adam'¶
- alpha: float = 0.0001¶
- batch_size: int | str = 'auto'¶
- learning_rate: Literal['constant', 'invscaling', 'adaptive'] = 'constant'¶
- learning_rate_init: float = 0.001¶
- power_t: float = 0.5¶
- max_iter: int = 200¶
- shuffle: bool = True¶
- tol: float = 0.0001¶
- verbose: bool = False¶
- warm_start: bool = False¶
- momentum: float = 0.9¶
- nesterovs_momentum: bool = True¶
- early_stopping: bool = False¶
- validation_fraction: float = 0.1¶
- beta_1: float = 0.9¶
- beta_2: float = 0.999¶
- epsilon: float = 1e-08¶
- n_iter_no_change: int = 10¶
- max_fun: int = 15000¶
- class coco_pipe.decoding.configs.GaussianNBConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['GaussianNB'] = 'GaussianNB'¶
- priors: List[float] | None = None¶
- var_smoothing: float = 1e-09¶
- class coco_pipe.decoding.configs.LDAConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['LinearDiscriminantAnalysis'] = 'LinearDiscriminantAnalysis'¶
- solver: Literal['svd', 'lsqr', 'eigen'] = 'svd'¶
- shrinkage: str | float | None = None¶
- priors: List[float] | None = None¶
- n_components: int | None = None¶
- store_covariance: bool = False¶
- tol: float = 0.0001¶
- class coco_pipe.decoding.configs.AdaBoostClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['AdaBoostClassifier'] = 'AdaBoostClassifier'¶
- n_estimators: int = 50¶
- learning_rate: float = 1.0¶
- algorithm: Literal['SAMME', 'SAMME.R'] = 'SAMME.R'¶
- class coco_pipe.decoding.configs.DummyClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['DummyClassifier'] = 'DummyClassifier'¶
- strategy: Literal['stratified', 'most_frequent', 'prior', 'uniform'] = 'prior'¶
- constant: Any | None = None¶
- class coco_pipe.decoding.configs.LPFTConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigConfiguration for Linear-Probe Fine-Tuning (LP-FT). Reference: Kumar et al. (2022).
- method: Literal['LPFTClassifier'] = 'LPFTClassifier'¶
- backbone_name: str = 'gpt2'¶
- lp_lr: float = 0.001¶
- lp_epochs: int = 10¶
- ft_lr: float = 1e-05¶
- ft_epochs: int = 5¶
- batch_size: int = 32¶
- max_length: int = 128¶
- device: str = 'cpu'¶
- class coco_pipe.decoding.configs.SkorchClassifierConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigConfiguration for generic PyTorch wrappers via Skorch.
- method: Literal['SkorchClassifier'] = 'SkorchClassifier'¶
- module_name: str¶
- max_epochs: int = 10¶
- lr: float = 0.01¶
- batch_size: int = 64¶
- optimizer: str = 'Adam'¶
- device: str = 'cpu'¶
- class coco_pipe.decoding.configs.SlidingEstimatorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigConfiguration for MNE’s SlidingEstimator. Fits a separate estimator for each time point.
- method: Literal['SlidingEstimator'] = 'SlidingEstimator'¶
- base_estimator: EstimatorConfigType¶
- scoring: str | Callable | None = None¶
- n_jobs: int | None = 1¶
- position: float | None = 0¶
- allow_2d: bool = False¶
- verbose: bool | str | int | None = None¶
- class coco_pipe.decoding.configs.GeneralizingEstimatorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigConfiguration for MNE’s GeneralizingEstimator. Fits an estimator on each time point and tests on all other time points.
- method: Literal['GeneralizingEstimator'] = 'GeneralizingEstimator'¶
- base_estimator: EstimatorConfigType¶
- scoring: str | Callable | None = None¶
- n_jobs: int | None = 1¶
- position: float | None = 0¶
- allow_2d: bool = False¶
- verbose: bool | str | int | None = None¶
- class coco_pipe.decoding.configs.LinearRegressionConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,LinearMixinBase configuration for any estimator.
- method: Literal['LinearRegression'] = 'LinearRegression'¶
- positive: bool = False¶
- class coco_pipe.decoding.configs.RidgeConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,RegularizedLinearMixinBase configuration for any estimator.
- method: Literal['Ridge'] = 'Ridge'¶
- alpha: float = 1.0¶
- fit_intercept: bool = True¶
- copy_X: bool = True¶
- class coco_pipe.decoding.configs.LassoConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,RegularizedLinearMixinBase configuration for any estimator.
- method: Literal['Lasso'] = 'Lasso'¶
- alpha: float = 1.0¶
- precompute: bool | List = False¶
- fit_intercept: bool = True¶
- copy_X: bool = True¶
- selection: Literal['cyclic', 'random'] = 'cyclic'¶
- class coco_pipe.decoding.configs.ElasticNetConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,RegularizedLinearMixinBase configuration for any estimator.
- method: Literal['ElasticNet'] = 'ElasticNet'¶
- alpha: float = 1.0¶
- l1_ratio: float = 0.5¶
- precompute: bool | List = False¶
- fit_intercept: bool = True¶
- copy_X: bool = True¶
- selection: Literal['cyclic', 'random'] = 'cyclic'¶
- class coco_pipe.decoding.configs.RandomForestRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,TreeMixinBase configuration for any estimator.
- method: Literal['RandomForestRegressor'] = 'RandomForestRegressor'¶
- criterion: Literal['squared_error', 'absolute_error', 'friedman_mse', 'poisson'] = 'squared_error'¶
- bootstrap: bool = True¶
- oob_score: bool = False¶
- max_samples: int | float | None = None¶
- class coco_pipe.decoding.configs.SVRConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,SupportVectorMixinBase configuration for any estimator.
- method: Literal['SVR'] = 'SVR'¶
- epsilon: float = 0.1¶
- class coco_pipe.decoding.configs.GradientBoostingRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['GradientBoostingRegressor'] = 'GradientBoostingRegressor'¶
- loss: Literal['squared_error', 'absolute_error', 'huber', 'quantile'] = 'squared_error'¶
- learning_rate: float = 0.1¶
- n_estimators: int = 100¶
- subsample: float = 1.0¶
- criterion: Literal['friedman_mse', 'squared_error'] = 'friedman_mse'¶
- min_samples_split: int | float = 2¶
- min_samples_leaf: int | float = 1¶
- min_weight_fraction_leaf: float = 0.0¶
- max_depth: int = 3¶
- min_impurity_decrease: float = 0.0¶
- init: str | None = None¶
- max_features: str | int | float | None = None¶
- alpha: float = 0.9¶
- verbose: int = 0¶
- max_leaf_nodes: int | None = None¶
- warm_start: bool = False¶
- validation_fraction: float = 0.1¶
- n_iter_no_change: int | None = None¶
- tol: float = 0.0001¶
- ccp_alpha: float = 0.0¶
- class coco_pipe.decoding.configs.SGDRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,SGDMixinBase configuration for any estimator.
- method: Literal['SGDRegressor'] = 'SGDRegressor'¶
- loss: str = 'squared_error'¶
- class coco_pipe.decoding.configs.MLPRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['MLPRegressor'] = 'MLPRegressor'¶
- activation: Literal['identity', 'logistic', 'tanh', 'relu'] = 'relu'¶
- alpha: float = 0.0001¶
- batch_size: int | str = 'auto'¶
- learning_rate: Literal['constant', 'invscaling', 'adaptive'] = 'constant'¶
- learning_rate_init: float = 0.001¶
- power_t: float = 0.5¶
- max_iter: int = 200¶
- shuffle: bool = True¶
- tol: float = 0.0001¶
- verbose: bool = False¶
- warm_start: bool = False¶
- momentum: float = 0.9¶
- nesterovs_momentum: bool = True¶
- early_stopping: bool = False¶
- validation_fraction: float = 0.1¶
- beta_1: float = 0.9¶
- beta_2: float = 0.999¶
- epsilon: float = 1e-08¶
- n_iter_no_change: int = 10¶
- max_fun: int = 15000¶
- class coco_pipe.decoding.configs.DummyRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['DummyRegressor'] = 'DummyRegressor'¶
- strategy: Literal['mean', 'median', 'quantile', 'constant'] = 'mean'¶
- constant: int | float | List | None = None¶
- quantile: float | None = None¶
- class coco_pipe.decoding.configs.DecisionTreeRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['DecisionTreeRegressor'] = 'DecisionTreeRegressor'¶
- criterion: Literal['squared_error', 'friedman_mse', 'absolute_error', 'poisson'] = 'squared_error'¶
- splitter: Literal['best', 'random'] = 'best'¶
- max_depth: int | None = None¶
- min_samples_split: int | float = 2¶
- min_samples_leaf: int | float = 1¶
- min_weight_fraction_leaf: float = 0.0¶
- max_features: str | int | float | None = None¶
- random_state: int | None = None¶
- max_leaf_nodes: int | None = None¶
- min_impurity_decrease: float = 0.0¶
- ccp_alpha: float = 0.0¶
- class coco_pipe.decoding.configs.KNeighborsRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['KNeighborsRegressor'] = 'KNeighborsRegressor'¶
- n_neighbors: int = None¶
- weights: Literal['uniform', 'distance'] = 'uniform'¶
- algorithm: Literal['auto', 'ball_tree', 'kd_tree', 'brute'] = 'auto'¶
- leaf_size: int = 30¶
- p: int = 2¶
- metric: str = 'minkowski'¶
- metric_params: Dict | None = None¶
- n_jobs: int | None = None¶
- class coco_pipe.decoding.configs.ExtraTreesRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfig,TreeMixinBase configuration for any estimator.
- method: Literal['ExtraTreesRegressor'] = 'ExtraTreesRegressor'¶
- bootstrap: bool = False¶
- oob_score: bool = False¶
- max_samples: int | float | None = None¶
- class coco_pipe.decoding.configs.HistGradientBoostingRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['HistGradientBoostingRegressor'] = 'HistGradientBoostingRegressor'¶
- loss: Literal['squared_error', 'absolute_error', 'poisson', 'quantile'] = 'squared_error'¶
- learning_rate: float = 0.1¶
- max_iter: int = 100¶
- max_leaf_nodes: int = 31¶
- max_depth: int | None = None¶
- min_samples_leaf: int = 20¶
- l2_regularization: float = 0.0¶
- max_bins: int = 255¶
- categorical_features: List[int] | List[str] | List[bool] | None = None¶
- monotonic_cst: Any | None = None¶
- interaction_cst: Any | None = None¶
- warm_start: bool = False¶
- early_stopping: str = 'auto'¶
- scoring: str | None = 'loss'¶
- validation_fraction: float = 0.1¶
- n_iter_no_change: int = 10¶
- tol: float = 1e-07¶
- verbose: int = 0¶
- random_state: int | None = None¶
- class coco_pipe.decoding.configs.AdaBoostRegressorConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['AdaBoostRegressor'] = 'AdaBoostRegressor'¶
- n_estimators: int = 50¶
- learning_rate: float = 1.0¶
- loss: Literal['linear', 'square', 'exponential'] = 'linear'¶
- class coco_pipe.decoding.configs.BayesianRidgeConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['BayesianRidge'] = 'BayesianRidge'¶
- n_iter: int = 300¶
- tol: float = 0.001¶
- alpha_1: float = 1e-06¶
- alpha_2: float = 1e-06¶
- lambda_1: float = 1e-06¶
- lambda_2: float = 1e-06¶
- alpha_init: float | None = None¶
- lambda_init: float | None = None¶
- compute_score: bool = False¶
- fit_intercept: bool = True¶
- copy_X: bool = True¶
- verbose: bool = False¶
- class coco_pipe.decoding.configs.ARDRegressionConfig(/, **data: Any)[source]¶
Bases:
BaseEstimatorConfigBase configuration for any estimator.
- method: Literal['ARDRegression'] = 'ARDRegression'¶
- n_iter: int = 300¶
- tol: float = 0.001¶
- alpha_1: float = 1e-06¶
- alpha_2: float = 1e-06¶
- lambda_1: float = 1e-06¶
- lambda_2: float = 1e-06¶
- compute_score: bool = False¶
- threshold_lambda: float = 10000.0¶
- fit_intercept: bool = True¶
- copy_X: bool = True¶
- verbose: bool = False¶
- coco_pipe.decoding.configs.AtomicEstimator¶
- coco_pipe.decoding.configs.EstimatorConfigType¶
- class coco_pipe.decoding.configs.TemporalConfig(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelConfiguration for temporal decoding (Sliding/Generalizing).
- enabled: bool = False¶
- window_interaction: Literal['sliding', 'generalizing'] = 'sliding'¶
- class coco_pipe.decoding.configs.CVConfig(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelCross-validation settings.
- strategy: Literal['stratified', 'kfold', 'group_kfold', 'stratified_group_kfold', 'leave_p_out', 'leave_one_out', 'timeseries', 'split'] = 'stratified'¶
- n_splits: int = None¶
- shuffle: bool = True¶
- random_state: int = 42¶
- class coco_pipe.decoding.configs.TuningConfig(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelHyperparameter Tuning Configuration. Use this to define HOW to search (random vs grid). The WHAT (the grid itself) is passed in ExperimentConfig.grids.
- enabled: bool = False¶
- search_type: Literal['grid', 'random'] = 'grid'¶
- n_iter: int = None¶
- scoring: str | None = None¶
- n_jobs: int = -1¶
- class coco_pipe.decoding.configs.FeatureSelectionConfig(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelConfiguration for Sequential Feature Selection.
- enabled: bool = False¶
- method: Literal['k_best', 'sfs'] = 'sfs'¶
- n_features: int | None = None¶
- direction: Literal['forward', 'backward'] = 'forward'¶
- cv: int | None = None¶
- scoring: str | None = None¶
- class coco_pipe.decoding.configs.ExperimentConfig(/, **data: Any)[source]¶
Bases:
pydantic.BaseModelMaster configuration for a Decoding Experiment.
- task: Literal['classification', 'regression'] = 'classification'¶
- output_dir: pathlib.Path | None = None¶
- tag: str = 'experiment'¶
- models: Dict[str, EstimatorConfigType]¶
- grids: Dict[str, Dict[str, List[Any]]] | None = None¶
- tuning: TuningConfig = None¶
- feature_selection: FeatureSelectionConfig = None¶
- metrics: List[str] = None¶
- temporal: TemporalConfig = None¶
- use_scaler: bool = None¶
- n_jobs: int = -1¶
- verbose: bool = True¶