Created
March 29, 2022 20:23
-
-
Save mikekeith52/48338ab23340f42590b2143d8f0ed647 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
from sklearn.linear_model import LinearRegression | |
from sklearn.linear_model import ElasticNet | |
from sklearn.neural_network import MLPRegressor | |
from sklearn.neighbors import KNeighborsRegressor | |
from xgboost import XGBRegressor | |
results = mvf.export_model_summaries() | |
estimators = [ | |
("mlr", LinearRegression()), | |
( | |
"elasticnet", | |
ElasticNet( | |
**results.loc[ | |
results["ModelNickname"] == "elasticnet", "HyperParams" | |
].values[0] | |
), | |
), | |
( | |
"mlp", | |
MLPRegressor( | |
**results.loc[results["ModelNickname"] == "mlp", "HyperParams"].values[ | |
0 | |
] | |
), | |
), | |
] | |
final_estimator = KNeighborsRegressor( | |
**results.loc[results["ModelNickname"] == "knn", "HyperParams"].values[0] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment