Last active
May 4, 2022 14:04
-
-
Save mikekeith52/c2b7b1b1c7103ab934995ceebc2535ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f.add_sklearn_estimator(StackingRegressor,'stacking') | |
f.set_estimator('stacking') | |
results = f.export('model_summaries') | |
estimators = [ | |
('knn', | |
KNeighborsRegressor(**results.loc[results['ModelNickname'] == 'knn','HyperParams'].values[0])), | |
('xgboost', | |
XGBRegressor(**results.loc[results['ModelNickname'] == 'xgboost','HyperParams'].values[0])), | |
('lightgbm', | |
LGBMRegressor(**results.loc[results['ModelNickname'] == 'lightgbm','HyperParams'].values[0])), | |
('sgd', | |
SGDRegressor(**results.loc[results['ModelNickname'] == 'sgd','HyperParams'].values[0])), | |
] | |
final_estimator = BaggingRegressor( | |
base_estimator = MLPRegressor( | |
hidden_layer_sizes=(100,100,100), | |
solver='lbfgs', | |
), | |
max_samples = 0.9, | |
max_features = 0.5, | |
) | |
f.manual_forecast(estimators=estimators,final_estimator=final_estimator) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment