revert all changes in normalize_data()
This commit is contained in:
parent
c21808ff98
commit
5cfb4154eb
@ -288,12 +288,11 @@ class FreqaiDataKitchen:
|
|||||||
:data_dictionary: updated dictionary with standardized values.
|
:data_dictionary: updated dictionary with standardized values.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
df = data_dictionary["train_features"]
|
|
||||||
# standardize the data by training stats
|
# standardize the data by training stats
|
||||||
train_max = df.max()
|
train_max = data_dictionary["train_features"].max()
|
||||||
train_min = df.min()
|
train_min = data_dictionary["train_features"].min()
|
||||||
df = (
|
data_dictionary["train_features"] = (
|
||||||
2 * (df - train_min) / (train_max - train_min) - 1
|
2 * (data_dictionary["train_features"] - train_min) / (train_max - train_min) - 1
|
||||||
)
|
)
|
||||||
data_dictionary["test_features"] = (
|
data_dictionary["test_features"] = (
|
||||||
2 * (data_dictionary["test_features"] - train_min) / (train_max - train_min) - 1
|
2 * (data_dictionary["test_features"] - train_min) / (train_max - train_min) - 1
|
||||||
@ -322,8 +321,8 @@ class FreqaiDataKitchen:
|
|||||||
- 1
|
- 1
|
||||||
)
|
)
|
||||||
|
|
||||||
self.data[f"{item}_max"] = train_labels_max
|
self.data[f"{item}_max"] = train_labels_max
|
||||||
self.data[f"{item}_min"] = train_labels_min
|
self.data[f"{item}_min"] = train_labels_min
|
||||||
return data_dictionary
|
return data_dictionary
|
||||||
|
|
||||||
def normalize_single_dataframe(self, df: DataFrame) -> DataFrame:
|
def normalize_single_dataframe(self, df: DataFrame) -> DataFrame:
|
||||||
|
Loading…
Reference in New Issue
Block a user