refactor(Naming): use new convention, added Ensemble model parameter back, support multiple Meta-Labeling models (#132)

* refactor(Naming): use `primary_models` & `meta_labeling_models`

* refactor(Naming): using primary * meta_labeling across config and in pipeline

* feat(Pipeline): added back Ensemble models

* fix(Pipeline): compiler error

* fix(Config): typo

* chore(Pipeline): removed unused averaging step

* revert the changes in discretizing

* chore(Pipeline): remove sharpe improvement logging

* fix(Pipeline): ensemble predictions should be a pd.Series instead of a DataFrame

* fix(Pipeline): discard unnecessary ensemble_probabilities

* fix(Pipeline): fixes regarding various meta-labeling ensemble bugs

* fix(Reporting): use the new naming convention

* fix(Reporting): use the right variable

* feat(Sweep): new sweep for ensemble models

* fix(Sweep): config reference

* fix(Config): simplified dev config

* fix(Models): use the faster LR model

* fix(Models): use LGBM in the meta-labeling model for speed

* fix(Selection): always use the first model for feature selection, commented out caching from select_features() as it's close to redundant in terms of speed
This commit is contained in:
Mark Aron Szulyovszky
2022-01-09 17:21:06 +01:00
committed by GitHub
parent 22b3167cb9
commit b1c04afb13
20 changed files with 202 additions and 239 deletions
+4 -2
View File
@@ -37,6 +37,7 @@ def evaluate_predictions(
y_true: pd.Series,
method: Literal['classification', 'regression'],
no_of_classes: Literal['two', 'three-balanced', 'three-imbalanced'],
print_results: bool,
discretize: bool = False,
) -> pd.Series:
# ignore the predictions until we see a non-zero returns (and definitely skip the first sliding_window_size)
@@ -100,8 +101,9 @@ def evaluate_predictions(
# scorecard.loc['edge_to_mae'] = 0.
scorecard = scorecard.round(3)
print("Model name: ", model_name)
print(scorecard)
if print_results:
print("Model name: ", model_name)
print(scorecard)
return scorecard