feat(Selection): added toggleable feature selection step into the pipeline (#83)

* feat(Selection): added prototype feature selection python script

* feat(Utils): added some helpers for the future from Advances in Financial ML book

* feat(Selection): added RFECV

* feat(Selection): added configurable feature selection step into pipeline

* feat(Config): added level_1 & level_2 default config, PCA before feature selection process starts

* feat(Selection): added backup feature selector models if current one can't output feature importance, removed unnecessary array for level-2 models

* fix(Training): deal with zero first value coming out of static models

* feat(Sweep): added feature selection sweep

* fix(Sweep): config problem

* fix(Sweep): config

* chore(Utils): removed unnecessary purged k-fold crossval class

* feat(Config): added dimensionality_reduction as a separate flag

* fix(Sweep): config updated

* fix(Sweep): sweep name

* chore(Config): updated level_2 config to the best performing configuation
This commit is contained in:
Mark Aron Szulyovszky
2021-12-27 21:59:22 +01:00
committed by GitHub
parent a9b05dbd42
commit cc70d3f907
19 changed files with 442 additions and 59 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ def __get_scaler(type: Literal['normalize', 'minmax', 'standardize', 'none']):
def run_single_asset_trainig(
ticker_to_predict: str,
original_X: pd.DataFrame,
X: pd.DataFrame,
y: pd.Series,
target_returns: pd.Series,
@@ -40,7 +41,7 @@ def run_single_asset_trainig(
model_over_time, preds = walk_forward_train_test(
model_name=model_name,
model = model,
X = X,
X = X if model.feature_selection == 'on' else original_X,
y = y,
target_returns = target_returns,
expanding_window = expanding_window,