Created
July 10, 2019 12:20
-
-
Save risenW/2104f75a6fe78aec301d55d9df947372 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
#Import boosting regressoion algorithms | |
# import xgboost.XGBRegressor as xgb_reg | |
# import lightgbm.LGBRegressor as lgb_reg | |
from sklearn.ensemble import AdaBoostRegressor, GradientBoostingRegressor | |
#Import boosting regressoion algorithms | |
# import xgboost.XGBClassifier as xgb_cf | |
# import lightgbm.LGBClassifier as lgb_cf | |
from sklearn.ensemble import AdaBoostClassifier, GradientBoostingClassifier | |
#Regression | |
ada_reg = AdaBoostRegressor(base_estimator=svr_reg,n_estimators=100, random_state=rand_seed) | |
gb_reg = GradientBoostingRegressor(n_estimators=100, random_state=rand_seed) | |
#Classification | |
ada_cf = AdaBoostClassifier(base_estimator=log_cf, random_state=rand_seed) | |
gb_cf = GradientBoostingClassifier(random_state=rand_seed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment