コード例 #1
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.PolynomialFeatures(
         degree=self.settings.get('degree', 2),
         interaction_only=self.settings.get('interaction_only', False),
         include_bias=self.settings.get('include_bias', True),
         order=self.settings.get('order', 'C'))
     self.pickle_process(dataframe)
コード例 #2
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.StandardScaler(
         copy=self.settings.get('copy', True),
         with_mean=self.settings.get('with_mean', True),
         with_std=self.settings.get('with_std', True),
     )
     self.pickle_process(dataframe)
コード例 #3
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.PowerTransformer(
         method=self.settings.get('method', 'yeo-johnson'),
         standardize=self.settings.get('standardize', True),
         copy=self.settings.get('copy', True)
     )
     self.pickle_process(dataframe)
コード例 #4
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.RobustScaler(
         with_centering=self.settings.get('with_centering', True),
         with_scaling=self.settings.get('with_scaling', True),
         quantile_range=self.settings.get('quantile_range',
                                          tuple([25.0, 75.0])),
         copy=self.settings.get('copy', True))
     self.pickle_process(dataframe)
コード例 #5
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.QuantileTransformer(
         n_quantiles=self.settings.get('n_quantiles', 1000),
         output_distribution=self.settings.get('output_distribution',
                                               'uniform'),
         ignore_implicit_zeros=self.settings.get('ignore_implicit_zeros',
                                                 False),
         subsample=self.settings.get('subsample', 100000),
         random_state=self.settings.get('random_state', None),
         copy=self.settings.get('copy', True))
     self.pickle_process(dataframe)
コード例 #6
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
コード例 #7
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.value = self.settings.get('value', 1)
コード例 #8
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.mode = dataframe[self.column].mode()[0]
コード例 #9
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.Normalizer(
         norm=self.settings.get('norm', 'l2'),
         copy=self.settings.get('copy', True))
コード例 #10
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.scaler = preprocessing.MaxAbsScaler(
         copy=self.settings.get('copy', True))
     self.pickle_process(dataframe)
コード例 #11
0
 def __init__(self, column, dataframe, settings):
     APreprocessor.__init__(self, column, dataframe, settings)
     self.median = dataframe[self.column].median()