class_docstr: Selects useful features.
  
  Several strategies are possible (filter and wrapper methods).
  Works for classification problems only (multiclass or binary).
  
  Parameters
  ----------
  strategy : str, defaut = "l1"
      The strategy to select features.
      Available strategies = {"variance", "l1", "rf_feature_importance"}
  
  threshold : float, defaut = 0.3
      The percentage of variable to discard according to the strategy.
      Must be between 0. and 1.
class_docstr_tok: ["Selects","useful","features",".","Several","strategies","are","possible","(","filter","and","wrapper","methods",")",".","Works","for","classification","problems","only","(","multiclass","or","binary",")",".","Parameters","--","--","--","--","--","strategy",":","str",",","defaut","=","``","l1","''","The","strategy","to","select","features",".","Available","strategies","=","{","``","variance","''",",","``","l1","''",",","``","rf_feature_importance","''","}","threshold",":","float",",","defaut","=","0.3","The","percentage","of","variable","to","discard","according","to","the","strategy",".","Must","be","between","0.","and","1","."]
docstr: Transforms the dataset
  
  Parameters
  ----------
  df : pandas dataframe of shape = (n, n_features)
      The dataset with numerical features and no NA
  
  Returns
  -------
  pandas dataframe of shape = (n_train, n_features*(1-threshold))
      The train dataset with relevant features
docstr_tok: ["Transforms","the","dataset","Parameters","--","--","--","--","--","df",":","pandas","dataframe","of","shape","=","(","n",",","n_features",")","The","dataset","with","numerical","features","and","no","NA","Returns","--","--","--","-","pandas","dataframe","of","shape","=","(","n_train",",","n_features","*","(","1-threshold",")",")","The","train","dataset","with","relevant","features"]
code: def transform(self, df):
      """Transforms the dataset
  
      Parameters
      ----------
      df : pandas dataframe of shape = (n, n_features)
          The dataset with numerical features and no NA
  
      Returns
      -------
      pandas dataframe of shape = (n_train, n_features*(1-threshold))
          The train dataset with relevant features
      """
  
      if self.__fitOK:
          # sanity checks
          if (type(df) != pd.SparseDataFrame) and (
              type(df) != pd.DataFrame
          ):
              raise ValueError("df must be a DataFrame")
  
          return df.drop(self.__to_discard, axis=1)
      else:
          raise ValueError("call fit or fit_transform function before")
  
file_path: MLBox/mlbox/model/classification/feature_selector.py
imports: import numpy
  import pandas
  from sklearn.linear_model import LogisticRegression
  from sklearn.ensemble import RandomForestClassifier
  import warnings
label_desc: Use image node_id 5 for calling the Clf_feature_selector obj's underlying member method code with example usage: obj.transform(df) and returns: df