|
@@ -70,7 +70,8 @@ class StrategyNorm(FeatureStrategyBase):
|
|
|
test_data[x_column] = test_data[x_column].apply(lambda x: f_format_value(points, x))
|
|
|
else:
|
|
|
str_columns.append(x_column)
|
|
|
- one_hot_encoder = OneHot(data.data, x_column)
|
|
|
+ one_hot_encoder = OneHot()
|
|
|
+ one_hot_encoder.fit(data.data, x_column)
|
|
|
one_hot_encoder.encoder(train_data)
|
|
|
one_hot_encoder.encoder(test_data)
|
|
|
model_columns.extend(one_hot_encoder.columns_onehot)
|
|
@@ -157,6 +158,10 @@ class StrategyNorm(FeatureStrategyBase):
|
|
|
return df[model_columns]
|
|
|
|
|
|
def feature_save(self, *args, **kwargs):
|
|
|
+ self.x_columns = None
|
|
|
+ self.one_hot_encoder_dict: Dict[str, OneHot] = {}
|
|
|
+ self.points_dict: Dict[str, List[float]] = {}
|
|
|
+
|
|
|
pass
|
|
|
|
|
|
def feature_load(self, path: str, *args, **kwargs):
|