class_docstr: A wrapper for popular classification/regression strategies in     neuroimaging.
  
  The `BaseDecoder` object supports classification and regression methods.
  It implements a model selection scheme that averages the best models
  within a cross validation loop (a technique sometimes known as CV bagging).
  The resulting average model is the one used as a classifier or a regressor.
  This object also leverages the `NiftiMaskers` to provide a direct interface
  with the Nifti files on disk.
  
  Parameters
  ----------
  estimator: str, default='svc'
      The estimator to use. For classification, choose among:
      %(classifier_options)s
      For regression, choose among:
      %(regressor_options)s
  
  mask: filename, Nifti1Image, NiftiMasker, MultiNiftiMasker, or          SurfaceMasker, default=None
      Mask to be used on data. If an instance of masker is passed,
      then its mask and parameters will be used. If no mask is given, mask
      will be computed automatically from provided images by an inbuilt
      masker with default parameters. Refer to NiftiMasker, MultiNiftiMasker
      or SurfaceMasker to check for default parameters. For use with
      SurfaceImage data, a SurfaceMasker instance must be passed.
  
  cv: cross-validation generator or int, default=10
      A cross-validation generator.
      See: https://scikit-learn.org/stable/modules/cross_validation.html
  
  param_grid: dict of str to sequence, or sequence of such, default=None
      The parameter grid to explore, as a dictionary mapping estimator
      parameters to sequences of allowed values.
  
      None or an empty dict signifies default parameters.
  
      A sequence of dicts signifies a sequence of grids to search, and is
      useful to avoid exploring parameter combinations that make no sense
      or have no effect. See scikit-learn documentation for more information,
      for example: https://scikit-learn.org/stable/modules/grid_search.html
  
      For Dummy estimators, parameter grid defaults to empty dictionary.
  
  clustering_percentile: int, float, in the [0, 100], default=10
      Percentile of features to keep after clustering. If it is lower
      than 100, a ReNA clustering is performed as a first step of fit
      to agglomerate similar features together. ReNA is typically efficient
      for clustering_percentile equal to 10.
  
  screening_percentile: int, float,                           in the closed interval [0, 100],                           default=20
      The percentage of brain volume that will be kept with respect to a full
      MNI template. In particular, if it is lower than 100, a univariate
      feature selection based on the Anova F-value for the input data will be
      performed. A float according to a percentile of the highest
      scores.
  
  scoring: str, callable or None,
           default=None
      The scoring strategy to use. See the scikit-learn documentation at
      https://scikit-learn.org/stable/modules/model_evaluation.html#the-scoring-parameter-defining-model-evaluation-rules
      If callable, takes as arguments the fitted estimator, the
      test data (X_test) and the test target (y_test) if y is
      not None.
      e.g. scorer(estimator, X_test, y_test)
  
      For regression, valid entries are: 'r2', 'neg_mean_absolute_error', or
      'neg_mean_squared_error'. Defaults to 'r2'.
  
      For classification, valid entries are: 'accuracy', 'f1', 'precision',
      'recall' or 'roc_auc'. Defaults to 'roc_auc'.
  %(smoothing_fwhm)s
  %(standardize)s
  %(target_affine)s
  %(target_shape)s
  %(low_pass)s
  %(high_pass)s
  %(t_r)s
  %(mask_strategy)s
  
      .. note::
          This parameter will be ignored if a mask image is provided.
  
      .. note::
          Depending on this value, the mask will be computed from
          :func:`nilearn.masking.compute_background_mask`,
          :func:`nilearn.masking.compute_epi_mask`, or
          :func:`nilearn.masking.compute_brain_mask`.
  
      Default is 'background'.
  %(memory)s
  %(memory_level)s
  %(n_jobs)s
  %(verbose0)s
  
  See Also
  --------
  nilearn.decoding.Decoder: Classification strategies for Neuroimaging,
  nilearn.decoding.DecoderRegressor: Regression strategies for Neuroimaging,
  nilearn.decoding.FREMClassifier: State of the art classification pipeline
      for Neuroimaging
  nilearn.decoding.FREMRegressor: State of the art regression pipeline
      for Neuroimaging
  nilearn.decoding.SpaceNetClassifier: Graph-Net and TV-L1 priors/penalties
class_docstr_tok: ["A","wrapper","for","popular","classification\/regression","strategies","in","neuroimaging",".","The","`","BaseDecoder","`","object","supports","classification","and","regression","methods",".","It","implements","a","model","selection","scheme","that","averages","the","best","models","within","a","cross","validation","loop","(","a","technique","sometimes","known","as","CV","bagging",")",".","The","resulting","average","model","is","the","one","used","as","a","classifier","or","a","regressor",".","This","object","also","leverages","the","`","NiftiMaskers","`","to","provide","a","direct","interface","with","the","Nifti","files","on","disk",".","Parameters","--","--","--","--","--","estimator",":","str",",","default='svc'","The","estimator","to","use",".","For","classification",",","choose","among",":","%","(","classifier_options",")","s","For","regression",",","choose","among",":","%","(","regressor_options",")","s","mask",":","filename",",","Nifti1Image",",","NiftiMasker",",","MultiNiftiMasker",",","or","SurfaceMasker",",","default=None","Mask","to","be","used","on","data",".","If","an","instance","of","masker","is","passed",",","then","its","mask","and","parameters","will","be","used",".","If","no","mask","is","given",",","mask","will","be","computed","automatically","from","provided","images","by","an","inbuilt","masker","with","default","parameters",".","Refer","to","NiftiMasker",",","MultiNiftiMasker","or","SurfaceMasker","to","check","for","default","parameters",".","For","use","with","SurfaceImage","data",",","a","SurfaceMasker","instance","must","be","passed",".","cv",":","cross-validation","generator","or","int",",","default=10","A","cross-validation","generator",".","See",":","https",":","\/\/scikit-learn.org\/stable\/modules\/cross_validation.html","param_grid",":","dict","of","str","to","sequence",",","or","sequence","of","such",",","default=None","The","parameter","grid","to","explore",",","as","a","dictionary","mapping","estimator","parameters","to","sequences","of","allowed","values",".","None","or","an","empty","dict","signifies","default","parameters",".","A","sequence","of","dicts","signifies","a","sequence","of","grids","to","search",",","and","is","useful","to","avoid","exploring","parameter","combinations","that","make","no","sense","or","have","no","effect",".","See","scikit-learn","documentation","for","more","information",",","for","example",":","https",":","\/\/scikit-learn.org\/stable\/modules\/grid_search.html","For","Dummy","estimators",",","parameter","grid","defaults","to","empty","dictionary",".","clustering_percentile",":","int",",","float",",","in","the","[","0",",","100","]",",","default=10","Percentile","of","features","to","keep","after","clustering",".","If","it","is","lower","than","100",",","a","ReNA","clustering","is","performed","as","a","first","step","of","fit","to","agglomerate","similar","features","together",".","ReNA","is","typically","efficient","for","clustering_percentile","equal","to","10.","screening_percentile",":","int",",","float",",","in","the","closed","interval","[","0",",","100","]",",","default=20","The","percentage","of","brain","volume","that","will","be","kept","with","respect","to","a","full","MNI","template",".","In","particular",",","if","it","is","lower","than","100",",","a","univariate","feature","selection","based","on","the","Anova","F-value","for","the","input","data","will","be","performed",".","A","float","according","to","a","percentile","of","the","highest","scores",".","scoring",":","str",",","callable","or","None",",","default=None","The","scoring","strategy","to","use",".","See","the","scikit-learn","documentation","at","https",":","\/\/scikit-learn.org\/stable\/modules\/model_evaluation.html","#","the-scoring-parameter-defining-model-evaluation-rules","If","callable",",","takes","as","arguments","the","fitted","estimator",",","the","test","data","(","X_test",")","and","the","test","target","(","y_test",")","if","y","is","not","None",".","e.g",".","scorer","(","estimator",",","X_test",",","y_test",")","For","regression",",","valid","entries","are",":","'r2","'",",","'neg_mean_absolute_error","'",",","or","'neg_mean_squared_error","'",".","Defaults","to","'r2","'",".","For","classification",",","valid","entries","are",":","'accuracy","'",",","'f1","'",",","'precision","'",",","'recall","'","or","'roc_auc","'",".","Defaults","to","'roc_auc","'",".","%","(","smoothing_fwhm",")","s","%","(","standardize",")","s","%","(","target_affine",")","s","%","(","target_shape",")","s","%","(","low_pass",")","s","%","(","high_pass",")","s","%","(","t_r",")","s","%","(","mask_strategy",")","s","..","note",":",":","This","parameter","will","be","ignored","if","a","mask","image","is","provided",".","..","note",":",":","Depending","on","this","value",",","the","mask","will","be","computed","from",":","func",":","`","nilearn.masking.compute_background_mask","`",",",":","func",":","`","nilearn.masking.compute_epi_mask","`",",","or",":","func",":","`","nilearn.masking.compute_brain_mask","`",".","Default","is","'background","'",".","%","(","memory",")","s","%","(","memory_level",")","s","%","(","n_jobs",")","s","%","(","verbose0",")","s","See","Also","--","--","--","--","nilearn.decoding.Decoder",":","Classification","strategies","for","Neuroimaging",",","nilearn.decoding.DecoderRegressor",":","Regression","strategies","for","Neuroimaging",",","nilearn.decoding.FREMClassifier",":","State","of","the","art","classification","pipeline","for","Neuroimaging","nilearn.decoding.FREMRegressor",":","State","of","the","art","regression","pipeline","for","Neuroimaging","nilearn.decoding.SpaceNetClassifier",":","Graph-Net","and","TV-L1","priors\/penalties"]
code: def _more_tags(self):
      return {"require_y": True}
  
imports: import itertools
  import warnings
  from typing import Iterable
  import numpy
  from joblib import Parallel, delayed
  from sklearn import clone
  from sklearn.base import BaseEstimator, MultiOutputMixin
  from sklearn.dummy import DummyClassifier, DummyRegressor
  from sklearn.linear_model import LassoCV, LogisticRegressionCV, RidgeClassifierCV, RidgeCV
  from sklearn.metrics import check_scoring, get_scorer
  from sklearn.model_selection import LeaveOneGroupOut, ParameterGrid, ShuffleSplit, StratifiedShuffleSplit, check_cv
  from sklearn.preprocessing import LabelBinarizer
  from sklearn.svm import SVR, LinearSVC, l1_min_c
  from sklearn.utils.extmath import safe_sparse_dot
  from sklearn.utils.validation import check_is_fitted, check_X_y
  from nilearn._utils import CacheMixin, fill_doc
  from nilearn._utils.cache_mixin import _check_memory
  from nilearn._utils.masker_validation import check_embedded_masker
  from nilearn._utils.param_validation import check_feature_screening
  from nilearn.experimental.surface import SurfaceMasker
  from nilearn.regions.rena_clustering import ReNA
label_desc: Use image node_id 12 for calling the _BaseDecoder obj's underlying member method code with example usage: obj._more_tags() and returns: dict