museotoolbox.ai.SequentialFeatureSelection.fit

SequentialFeatureSelection.fit(X, y, group=None, cv=5, scoring='accuracy', standardize=True, max_features=False, resampler=False, recompute_best=False, n_jobs=1, **kwargs)[source]
Parameters
  • X (np.ndarray) – shape of np.ndarray is (n_size,n_bands).

  • y (np.ndarray) – Size of X.shape[0].

  • group (None, optional) – group for cross-validation

  • cv (int, or cross_validation method, optional (default=5)) – Default will use

  • scoring (str or class, optional (default='accuracy')) – default is ‘accuracy’. See sklearn.metrics.make_scorer from scikit-learn.

  • standardize (optional) – Default True.

  • max_features (int or bool.) – Default False, if value int.

  • resampler (imblearn class or False, optional) – Default is False If class is given, each fold will be retreated resampler.fit_resample(X,y) method.

  • recompute_best (bool, default : False.) – If True, will recompute the model with the best already found variables. This can be usefull if you changed algorithms, parameters, cross-validation…

  • n_jobs (int.) – Number of job to compute cross-validation.