class_docstr: Fast LOFO Importance
  Applies already trained model on validation set by noising one feature each time.
  
  Parameters
  ----------
  trained_model: model (sklearn API)
      The model should be trained already
  validation_df: pandas dataframe
  features: list of strings
      List of column names for features within validation_df
  target: string
      Column name for target within validation_df
  scoring: string or callable
      Same as scoring in sklearn API
  n_jobs: int, optional
      Number of jobs for parallel computation
class_docstr_tok: ["Fast","LOFO","Importance","Applies","already","trained","model","on","validation","set","by","noising","one","feature","each","time",".","Parameters","--","--","--","--","--","trained_model",":","model","(","sklearn","API",")","The","model","should","be","trained","already","validation_df",":","pandas","dataframe","features",":","list","of","strings","List","of","column","names","for","features","within","validation_df","target",":","string","Column","name","for","target","within","validation_df","scoring",":","string","or","callable","Same","as","scoring","in","sklearn","API","n_jobs",":","int",",","optional","Number","of","jobs","for","parallel","computation"]
code: def __init__(
      self,
      trained_model,
      validation_df,
      features,
      target,
      scoring,
      n_jobs=None,
  ):
      self.trained_model = trained_model
      self.df = validation_df.copy()
      self.features = features
      self.target = target
      self.n_jobs = n_jobs
      self.scorer = check_scoring(
          estimator=self.trained_model, scoring=scoring
      )
  
      # FLOFO defaults
      self.num_bins = 10
      self.shuffle_func = np.random.permutation
      self.feature_group_len = 2
      self.num_sampling = 10
  
      min_data_needed = 10 * (self.num_bins**self.feature_group_len)
      if self.df.shape[0] < min_data_needed:
          raise Exception(
              "Small validation set (<{})".format(min_data_needed)
          )
      if len(self.features) <= self.feature_group_len:
          raise Exception(
              "FLOFO needs more than {} features".format(
                  self.feature_group_len
              )
          )
  
      if self.n_jobs is not None and self.n_jobs > 1:
          warning_str = (
              "Warning: If your model is multithreaded, please initialise the number"
              "of jobs of LOFO to be equal to 1, otherwise you may experience performance issues."
          )
          warnings.warn(warning_str)
  
      self._bin_features()
  
file_path: lofo-importance/lofo/flofo_importance.py
imports: import numpy
  import pandas
  from tqdm.autonotebook import tqdm
  import warnings
  from sklearn.metrics import check_scoring
  from lofo.utils import lofo_to_df, parallel_apply
label_desc: Use image node_id 1 to create a new FLOFOImportance object  with example: obj = FLOFOImportance(trained_model, validation_df, features, target, scoring, n_jobs)