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
+1 -1
View File
@@ -21,7 +21,7 @@ def flatten(list_of_lists: list) -> list:
return [item for sublist in list_of_lists for item in sublist]
def weighted_average(df: pd.DataFrame, weights_source: str) -> pd.Series:
if df.shape[0] == 0:
if df.shape[1] == 0:
return df
mean_df = df.iloc[:,0]
weights = df.loc[weights_source]