fix: update new feature engineering code format (#272)

* update new feature engineering code format

* fix CI
This commit is contained in:
Xu Yang
2024-09-19 12:56:48 +08:00
committed by GitHub
parent 0166273e15
commit e9395ee045
4 changed files with 51 additions and 24 deletions
@@ -2,12 +2,14 @@ import os
import numpy as np
import pandas as pd
from factor import feat_eng
from factor import feature_engineering_cls
if os.path.exists("valid.pkl"):
valid_df = pd.read_pickle("valid.pkl")
else:
raise FileNotFoundError("No valid data found.")
new_feat = feat_eng(valid_df)
cls = feature_engineering_cls()
cls.fit(valid_df)
new_feat = cls.transform(valid_df)
new_feat.to_hdf("result.h5", key="data", mode="w")