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. Key Components: - ModelConfigs: extensive hyperparameters for each estimator. - ExperimentConfig: Top-level configuration for the entire analysis workflow. Attributes ---------- .. autoapisummary:: coco_pipe.decoding.configs.AtomicEstimator coco_pipe.decoding.configs.EstimatorConfigType Classes ------- .. autoapisummary:: coco_pipe.decoding.configs.BaseEstimatorConfig 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.LogisticRegressionConfig coco_pipe.decoding.configs.RandomForestClassifierConfig coco_pipe.decoding.configs.SVCConfig coco_pipe.decoding.configs.KNeighborsClassifierConfig coco_pipe.decoding.configs.GradientBoostingClassifierConfig 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.TemporalConfig coco_pipe.decoding.configs.CVConfig coco_pipe.decoding.configs.TuningConfig coco_pipe.decoding.configs.FeatureSelectionConfig coco_pipe.decoding.configs.ExperimentConfig Module Contents --------------- .. py:class:: BaseEstimatorConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Base configuration for any estimator. .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:attribute:: random_state :type: Optional[int] :value: None .. py:class:: LinearMixin(/, **data: Any) 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: Optional[int] :value: None .. py:class:: RegularizedLinearMixin(/, **data: Any) Bases: :py:obj:`LinearMixin` Parameters for regularized linear models. .. py:attribute:: tol :type: float :value: 0.001 .. py:attribute:: max_iter :type: Optional[int] :value: None .. py:attribute:: solver :type: str :value: 'auto' .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: positive :type: bool :value: False .. py:class:: TreeMixin(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Common parameters for Tree-based models. .. py:attribute:: n_estimators :type: int :value: None .. py:attribute:: max_depth :type: Optional[int] :value: None .. py:attribute:: min_samples_split :type: Union[int, float] :value: 2 .. py:attribute:: min_samples_leaf :type: Union[int, float] :value: 1 .. py:attribute:: min_weight_fraction_leaf :type: float :value: 0.0 .. py:attribute:: max_features :type: Union[str, int, float, None] :value: 'sqrt' .. py:attribute:: max_leaf_nodes :type: Optional[int] :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: Optional[int] :value: None .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: warm_start :type: bool :value: False .. py:class:: SupportVectorMixin(/, **data: Any) 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: Union[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: Any) Bases: :py:obj:`pydantic.BaseModel` !!! abstract "Usage Documentation" [Models](../concepts/models.md) A base class for creating Pydantic models. .. attribute:: __class_vars__ The names of the class variables defined on the model. .. attribute:: __private_attributes__ Metadata about the private attributes of the model. .. attribute:: __signature__ The synthesized `__init__` [`Signature`][inspect.Signature] of the model. .. attribute:: __pydantic_complete__ Whether model building is completed, or if there are still undefined fields. .. attribute:: __pydantic_core_schema__ The core schema of the model. .. attribute:: __pydantic_custom_init__ Whether the model has a custom `__init__` function. .. attribute:: __pydantic_decorators__ Metadata containing the decorators defined on the model. This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1. .. attribute:: __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. .. attribute:: __pydantic_parent_namespace__ Parent namespace of the model, used for automatic rebuilding of models. .. attribute:: __pydantic_post_init__ The name of the post-init method for the model, if defined. .. attribute:: __pydantic_root_model__ Whether the model is a [`RootModel`][pydantic.root_model.RootModel]. .. attribute:: __pydantic_serializer__ The `pydantic-core` `SchemaSerializer` used to dump instances of the model. .. attribute:: __pydantic_validator__ The `pydantic-core` `SchemaValidator` used to validate instances of the model. .. attribute:: __pydantic_fields__ A dictionary of field names and their corresponding [`FieldInfo`][pydantic.fields.FieldInfo] objects. .. attribute:: __pydantic_computed_fields__ A dictionary of computed field names and their corresponding [`ComputedFieldInfo`][pydantic.fields.ComputedFieldInfo] objects. .. attribute:: __pydantic_extra__ A dictionary containing extra values, if [`extra`][pydantic.config.ConfigDict.extra] is set to `'allow'`. .. attribute:: __pydantic_fields_set__ The names of fields explicitly set during instantiation. .. attribute:: __pydantic_private__ Values of private attributes set on the model instance. .. py:attribute:: loss :type: str :value: 'hinge' .. py:attribute:: penalty :type: Literal['l2', 'l1', 'elasticnet', 'null'] :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:: n_jobs :type: Optional[int] :value: None .. py:attribute:: learning_rate :type: str :value: 'optimal' .. py:attribute:: eta0 :type: float :value: 0.0 .. py:attribute:: power_t :type: float :value: 0.5 .. py:attribute:: early_stopping :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:: warm_start :type: bool :value: False .. py:attribute:: average :type: bool :value: False .. py:class:: LogisticRegressionConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['LogisticRegression'] :value: 'LogisticRegression' .. py:attribute:: penalty :type: Literal['l1', 'l2', 'elasticnet', 'none', 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: Optional[Union[Dict, str]] :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:: multiclass :type: Literal['auto', 'ovr', 'multinomial'] :value: 'auto' .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: n_jobs :type: Optional[int] :value: None .. py:attribute:: l1_ratio :type: Optional[float] :value: None .. py:class:: RandomForestClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`TreeMixin` Base configuration for any estimator. .. 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: Optional[Union[str, Dict, List]] :value: None .. py:attribute:: max_samples :type: Optional[Union[int, float]] :value: None .. py:class:: SVCConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`SupportVectorMixin` Base configuration for any estimator. .. py:attribute:: method :type: Literal['SVC'] :value: 'SVC' .. py:attribute:: probability :type: bool :value: True .. py:attribute:: class_weight :type: Optional[Union[Dict, str]] :value: None .. py:attribute:: decision_function_shape :type: Literal['ovo', 'ovr'] :value: 'ovr' .. py:attribute:: break_ties :type: bool :value: False .. py:class:: KNeighborsClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. 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: Optional[Dict] :value: None .. py:attribute:: n_jobs :type: Optional[int] :value: None .. py:class:: GradientBoostingClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['GradientBoostingClassifier'] :value: 'GradientBoostingClassifier' .. py:attribute:: loss :type: Literal['log_loss', 'exponential'] :value: 'log_loss' .. 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: Union[int, float] :value: 2 .. py:attribute:: min_samples_leaf :type: Union[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: Optional[str] :value: None .. py:attribute:: max_features :type: Union[str, int, float, None] :value: None .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: max_leaf_nodes :type: Optional[int] :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: Optional[int] :value: None .. py:attribute:: tol :type: float :value: 0.0001 .. py:attribute:: ccp_alpha :type: float :value: 0.0 .. py:class:: SGDClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`SGDMixin` Base configuration for any estimator. .. py:attribute:: method :type: Literal['SGDClassifier'] :value: 'SGDClassifier' .. py:attribute:: class_weight :type: Optional[Union[Dict, str]] :value: None .. py:class:: MLPClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['MLPClassifier'] :value: 'MLPClassifier' .. 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: Union[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:class:: GaussianNBConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['GaussianNB'] :value: 'GaussianNB' .. py:attribute:: priors :type: Optional[List[float]] :value: None .. py:attribute:: var_smoothing :type: float :value: 1e-09 .. py:class:: LDAConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['LinearDiscriminantAnalysis'] :value: 'LinearDiscriminantAnalysis' .. py:attribute:: solver :type: Literal['svd', 'lsqr', 'eigen'] :value: 'svd' .. py:attribute:: shrinkage :type: Optional[Union[str, float]] :value: None .. py:attribute:: priors :type: Optional[List[float]] :value: None .. py:attribute:: n_components :type: Optional[int] :value: None .. py:attribute:: store_covariance :type: bool :value: False .. py:attribute:: tol :type: float :value: 0.0001 .. py:class:: AdaBoostClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. 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:: algorithm :type: Literal['SAMME', 'SAMME.R'] :value: 'SAMME.R' .. py:class:: DummyClassifierConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['DummyClassifier'] :value: 'DummyClassifier' .. py:attribute:: strategy :type: Literal['stratified', 'most_frequent', 'prior', 'uniform'] :value: 'prior' .. py:attribute:: constant :type: Optional[Any] :value: None .. py:class:: LPFTConfig(/, **data: Any) 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: Any) 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: Any) Bases: :py:obj:`BaseEstimatorConfig` Configuration for MNE's 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: Optional[Union[str, Callable]] :value: None .. py:attribute:: n_jobs :type: Optional[int] :value: 1 .. py:attribute:: position :type: Optional[float] :value: 0 .. py:attribute:: allow_2d :type: bool :value: False .. py:attribute:: verbose :type: Optional[Union[bool, str, int]] :value: None .. py:class:: GeneralizingEstimatorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Configuration for MNE's 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: Optional[Union[str, Callable]] :value: None .. py:attribute:: n_jobs :type: Optional[int] :value: 1 .. py:attribute:: position :type: Optional[float] :value: 0 .. py:attribute:: allow_2d :type: bool :value: False .. py:attribute:: verbose :type: Optional[Union[bool, str, int]] :value: None .. py:class:: LinearRegressionConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`LinearMixin` Base configuration for any estimator. .. py:attribute:: method :type: Literal['LinearRegression'] :value: 'LinearRegression' .. py:attribute:: positive :type: bool :value: False .. py:class:: RidgeConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`RegularizedLinearMixin` Base configuration for any estimator. .. 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:class:: LassoConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`RegularizedLinearMixin` Base configuration for any estimator. .. py:attribute:: method :type: Literal['Lasso'] :value: 'Lasso' .. py:attribute:: alpha :type: float :value: 1.0 .. py:attribute:: precompute :type: Union[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:class:: ElasticNetConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`RegularizedLinearMixin` Base configuration for any estimator. .. 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: Union[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:class:: RandomForestRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`TreeMixin` Base configuration for any estimator. .. 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: Optional[Union[int, float]] :value: None .. py:class:: SVRConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`SupportVectorMixin` Base configuration for any estimator. .. py:attribute:: method :type: Literal['SVR'] :value: 'SVR' .. py:attribute:: epsilon :type: float :value: 0.1 .. py:class:: GradientBoostingRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['GradientBoostingRegressor'] :value: 'GradientBoostingRegressor' .. py:attribute:: loss :type: Literal['squared_error', 'absolute_error', 'huber', 'quantile'] :value: 'squared_error' .. 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: Union[int, float] :value: 2 .. py:attribute:: min_samples_leaf :type: Union[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: Optional[str] :value: None .. py:attribute:: max_features :type: Union[str, int, float, None] :value: None .. py:attribute:: alpha :type: float :value: 0.9 .. py:attribute:: verbose :type: int :value: 0 .. py:attribute:: max_leaf_nodes :type: Optional[int] :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: Optional[int] :value: None .. py:attribute:: tol :type: float :value: 0.0001 .. py:attribute:: ccp_alpha :type: float :value: 0.0 .. py:class:: SGDRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`SGDMixin` Base configuration for any estimator. .. py:attribute:: method :type: Literal['SGDRegressor'] :value: 'SGDRegressor' .. py:attribute:: loss :type: str :value: 'squared_error' .. py:class:: MLPRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['MLPRegressor'] :value: 'MLPRegressor' .. py:attribute:: hidden_layer_sizes :type: tuple :value: (100,) .. py:attribute:: activation :type: Literal['identity', 'logistic', 'tanh', 'relu'] :value: 'relu' .. py:attribute:: alpha :type: float :value: 0.0001 .. py:attribute:: batch_size :type: Union[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:class:: DummyRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['DummyRegressor'] :value: 'DummyRegressor' .. py:attribute:: strategy :type: Literal['mean', 'median', 'quantile', 'constant'] :value: 'mean' .. py:attribute:: constant :type: Optional[Union[int, float, List]] :value: None .. py:attribute:: quantile :type: Optional[float] :value: None .. py:class:: DecisionTreeRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. 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: Optional[int] :value: None .. py:attribute:: min_samples_split :type: Union[int, float] :value: 2 .. py:attribute:: min_samples_leaf :type: Union[int, float] :value: 1 .. py:attribute:: min_weight_fraction_leaf :type: float :value: 0.0 .. py:attribute:: max_features :type: Union[str, int, float, None] :value: None .. py:attribute:: random_state :type: Optional[int] :value: None .. py:attribute:: max_leaf_nodes :type: Optional[int] :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: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. 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: Optional[Dict] :value: None .. py:attribute:: n_jobs :type: Optional[int] :value: None .. py:class:: ExtraTreesRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig`, :py:obj:`TreeMixin` Base configuration for any estimator. .. 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: Optional[Union[int, float]] :value: None .. py:class:: HistGradientBoostingRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. 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: Optional[int] :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: Optional[Union[List[int], List[str], List[bool]]] :value: None .. py:attribute:: monotonic_cst :type: Optional[Any] :value: None .. py:attribute:: interaction_cst :type: Optional[Any] :value: None .. py:attribute:: warm_start :type: bool :value: False .. py:attribute:: early_stopping :type: str :value: 'auto' .. py:attribute:: scoring :type: Optional[str] :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: Optional[int] :value: None .. py:class:: AdaBoostRegressorConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. 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:class:: BayesianRidgeConfig(/, **data: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['BayesianRidge'] :value: 'BayesianRidge' .. py:attribute:: n_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: Optional[float] :value: None .. py:attribute:: lambda_init :type: Optional[float] :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: Any) Bases: :py:obj:`BaseEstimatorConfig` Base configuration for any estimator. .. py:attribute:: method :type: Literal['ARDRegression'] :value: 'ARDRegression' .. py:attribute:: n_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:data:: AtomicEstimator .. py:data:: EstimatorConfigType .. py:class:: TemporalConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Configuration for temporal decoding (Sliding/Generalizing). .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: window_interaction :type: Literal['sliding', 'generalizing'] :value: 'sliding' .. py:class:: CVConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Cross-validation settings. .. py:attribute:: strategy :type: Literal['stratified', 'kfold', 'group_kfold', 'stratified_group_kfold', 'leave_p_out', 'leave_one_out', 'timeseries', '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:class:: TuningConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Hyperparameter Tuning Configuration. Use this to define HOW to search (random vs grid). The WHAT (the grid itself) is passed in ExperimentConfig.grids. .. 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: Optional[str] :value: None .. py:attribute:: n_jobs :type: int :value: -1 .. py:class:: FeatureSelectionConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Configuration for Sequential Feature Selection. .. py:attribute:: enabled :type: bool :value: False .. py:attribute:: method :type: Literal['k_best', 'sfs'] :value: 'sfs' .. py:attribute:: n_features :type: Optional[int] :value: None .. py:attribute:: direction :type: Literal['forward', 'backward'] :value: 'forward' .. py:attribute:: cv :type: Optional[int] :value: None .. py:attribute:: scoring :type: Optional[str] :value: None .. py:class:: ExperimentConfig(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Master configuration for a Decoding Experiment. .. py:attribute:: task :type: Literal['classification', 'regression'] :value: 'classification' .. py:attribute:: output_dir :type: Optional[pathlib.Path] :value: None .. py:attribute:: tag :type: str :value: 'experiment' .. py:attribute:: models :type: Dict[str, EstimatorConfigType] .. py:attribute:: grids :type: Optional[Dict[str, Dict[str, List[Any]]]] :value: None .. py:attribute:: cv :type: CVConfig :value: None .. py:attribute:: tuning :type: TuningConfig :value: None .. py:attribute:: feature_selection :type: FeatureSelectionConfig :value: None .. py:attribute:: metrics :type: List[str] :value: None .. py:attribute:: temporal :type: TemporalConfig :value: None .. py:attribute:: use_scaler :type: bool :value: None .. py:attribute:: n_jobs :type: int :value: -1 .. py:attribute:: verbose :type: bool :value: True