Created
April 8, 2020 21:50
-
-
Save smazzanti/a46232dc3861867ef56f406652615ab8 to your computer and use it in GitHub Desktop.
This file contains 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.dummy import DummyRegressor | |
from sklearn.linear_model import LinearRegression | |
from sklearn.neighbors import KNeighborsRegressor | |
from sklearn.svm import SVR | |
from sklearn.ensemble import RandomForestRegressor | |
from xgboost import XGBRegressor | |
from lightgbm import LGBMRegressor | |
# dictionary of models that will be used for comparison | |
models = { | |
'DummyRegressor': DummyRegressor(), | |
'LinearRegression': LinearRegression(), | |
'KNeighborsRegressor': KNeighborsRegressor(n_neighbors = int(np.sqrt(len(X_trn)))), | |
'SupportVectorRegressor': SVR(C = .1), | |
'RandomForestRegressor': RandomForestRegressor(max_depth = 5), | |
'XGBRegressor': XGBRegressor(max_depht = 5), | |
'LGBMRegressor': LGBMRegressor(num_leaves = 10), | |
'UnbeatableRegressor': UnbeatableRegressor() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment