class_docstr: State of the art :term:`decoding` scheme applied        to usual regression estimators.
  
  FREM uses an implicit spatial regularization through fast clustering and
  aggregates a high number of estimators trained on various splits of the
  training set, thus returning a very robust decoder
  at a lower computational cost
  than other spatially regularized methods :footcite:p:`Hoyos-Idrobo2018`.
  
  Parameters
  ----------
  estimator : str, optional
      The estimator to choose among:
      %(regressor_options)s
      Default 'svr'.
  
  mask : filename, Nifti1Image, NiftiMasker, or MultiNiftiMasker, optional,
      (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 or
      MultiNiftiMasker to check for default parameters.
  
  cv : int or cross-validation generator, optional (default 30)
      If int, number of shuffled splits returned, which is usually the right
      way to train many different classifiers. A good trade-off between
      stability of the aggregated model and computation time is 50 splits.
      Shuffled splits are seeded by default for reproducibility.
      Can also be a cross-validation generator.
  
  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
  
  clustering_percentile : int, float, optional, in closed interval [0, 100]        (default 10)
      Used to perform a fast ReNA clustering on input data as a first step of
      fit. It agglomerates similar features together to reduce their number
      by this percentile. ReNA is typically efficient for cluster_percentile
      equal to 10.
  
  screening_percentile : int, float, optional, in 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= 'r2'
  
      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'.
  %(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='background'.
  %(memory)s
  %(memory_level)s
  %(n_jobs)s
  %(verbose0)s
  
  References
  ----------
  .. footbibliography::
  
  See Also
  --------
  nilearn.decoding.DecoderRegressor: Regression strategies for Neuroimaging,
  nilearn.decoding.FREMClassifier: State of the art classification pipeline
      for Neuroimaging
class_docstr_tok: ["State","of","the","art",":","term",":","`","decoding","`","scheme","applied","to","usual","regression","estimators",".","FREM","uses","an","implicit","spatial","regularization","through","fast","clustering","and","aggregates","a","high","number","of","estimators","trained","on","various","splits","of","the","training","set",",","thus","returning","a","very","robust","decoder","at","a","lower","computational","cost","than","other","spatially","regularized","methods",":","footcite",":","p",":","`","Hoyos-Idrobo2018","`",".","Parameters","--","--","--","--","--","estimator",":","str",",","optional","The","estimator","to","choose","among",":","%","(","regressor_options",")","s","Default","'svr","'",".","mask",":","filename",",","Nifti1Image",",","NiftiMasker",",","or","MultiNiftiMasker",",","optional",",","(","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","or","MultiNiftiMasker","to","check","for","default","parameters",".","cv",":","int","or","cross-validation","generator",",","optional","(","default","30",")","If","int",",","number","of","shuffled","splits","returned",",","which","is","usually","the","right","way","to","train","many","different","classifiers",".","A","good","trade-off","between","stability","of","the","aggregated","model","and","computation","time","is","50","splits",".","Shuffled","splits","are","seeded","by","default","for","reproducibility",".","Can","also","be","a","cross-validation","generator",".","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","clustering_percentile",":","int",",","float",",","optional",",","in","closed","interval","[","0",",","100","]","(","default","10",")","Used","to","perform","a","fast","ReNA","clustering","on","input","data","as","a","first","step","of","fit",".","It","agglomerates","similar","features","together","to","reduce","their","number","by","this","percentile",".","ReNA","is","typically","efficient","for","cluster_percentile","equal","to","10.","screening_percentile",":","int",",","float",",","optional",",","in","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=","'r2'","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","'",".","%","(","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='background","'",".","%","(","memory",")","s","%","(","memory_level",")","s","%","(","n_jobs",")","s","%","(","verbose0",")","s","References","--","--","--","--","--","..","footbibliography",":",":","See","Also","--","--","--","--","nilearn.decoding.DecoderRegressor",":","Regression","strategies","for","Neuroimaging",",","nilearn.decoding.FREMClassifier",":","State","of","the","art","classification","pipeline","for","Neuroimaging"]
code: def __init__(
      self,
      estimator="svr",
      mask=None,
      cv=30,
      param_grid=None,
      clustering_percentile=10,
      screening_percentile=20,
      scoring="r2",
      smoothing_fwhm=None,
      standardize=True,
      target_affine=None,
      target_shape=None,
      mask_strategy="background",
      low_pass=None,
      high_pass=None,
      t_r=None,
      memory=None,
      memory_level=0,
      n_jobs=1,
      verbose=0,
  ):
      self.classes_ = ["beta"]
  
      if isinstance(cv, int):
          cv = ShuffleSplit(cv, random_state=0)
  
      super().__init__(
          estimator=estimator,
          mask=mask,
          cv=cv,
          param_grid=param_grid,
          clustering_percentile=clustering_percentile,
          screening_percentile=screening_percentile,
          scoring=scoring,
          smoothing_fwhm=smoothing_fwhm,
          standardize=standardize,
          target_affine=target_affine,
          target_shape=target_shape,
          low_pass=low_pass,
          high_pass=high_pass,
          t_r=t_r,
          mask_strategy=mask_strategy,
          memory=memory,
          is_classification=False,
          memory_level=memory_level,
          verbose=verbose,
          n_jobs=n_jobs,
      )
  
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 1 to create a new FREMRegressor object from inherited base classes: _BaseDecoder with example: obj = FREMRegressor(estimator, mask, cv, param_grid, clustering_percentile, screening_percentile, scoring, smoothing_fwhm, standardize, target_affine, target_shape, mask_strategy, low_pass, high_pass, t_r, memory, memory_level, n_jobs, verbose)