mirror of
https://github.com/webclinic017/drift.git
synced 2026-08-13 19:08:06 +00:00
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:
+7
-3
@@ -1,5 +1,6 @@
|
||||
from sklearn.linear_model import LinearRegression, Lasso, BayesianRidge, Ridge
|
||||
from sklearnex.linear_model import LogisticRegression
|
||||
from sklearn.linear_model import LogisticRegression
|
||||
from sklearnex.linear_model import LogisticRegression as LogisticRegression_EX
|
||||
from sklearn.tree import DecisionTreeClassifier
|
||||
from sklearnex.neighbors import KNeighborsRegressor, KNeighborsClassifier
|
||||
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
|
||||
@@ -44,7 +45,8 @@ model_map = {
|
||||
)
|
||||
),
|
||||
"classification_models": dict(
|
||||
LR= SKLearnModel(LogisticRegression(C=10, random_state=1, max_iter=1000, n_jobs=-1)),
|
||||
LR_two_class= SKLearnModel(LogisticRegression(C=10, random_state=1, solver='liblinear', max_iter=1000)),
|
||||
LR_three_class= SKLearnModel(LogisticRegression_EX(C=10, random_state=1, max_iter=1000, n_jobs=-1)),
|
||||
LDA= SKLearnModel(LinearDiscriminantAnalysis()),
|
||||
KNN= SKLearnModel(KNeighborsClassifier()),
|
||||
CART= SKLearnModel(DecisionTreeClassifier(max_depth=15, random_state=1)),
|
||||
@@ -55,9 +57,11 @@ model_map = {
|
||||
XGB_two_class= XGBoostModel(XGBClassifier(n_jobs=-1, max_depth = 20, random_state=1, objective='binary:logistic', use_label_encoder= False, eval_metric='mlogloss')),
|
||||
LGBM = SKLearnModel(LGBMClassifier(n_jobs=-1, max_depth=20, random_state=1)),
|
||||
StaticMom= StaticMomentumModel(allow_short=True),
|
||||
Ensemble_Average= StaticAverageModel(),
|
||||
# ExpSmoothing = SKLearnModel(ExponentialSmoothing(trend='add', seasonal='add', seasonal_periods=30)),
|
||||
),
|
||||
"ensemble_models": dict(
|
||||
Average= StaticAverageModel(),
|
||||
)
|
||||
}
|
||||
|
||||
model_names_classification = list(model_map["classification_models"].keys())
|
||||
|
||||
Reference in New Issue
Block a user