本文整理汇总了Python中sklearn.ensemble.GradientBoostingRegressor.name方法的典型用法代码示例。如果您正苦于以下问题:Python GradientBoostingRegressor.name方法的具体用法?Python GradientBoostingRegressor.name怎么用?Python GradientBoostingRegressor.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sklearn.ensemble.GradientBoostingRegressor
的用法示例。
在下文中一共展示了GradientBoostingRegressor.name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: airports_monthly_traffic
# 需要导入模块: from sklearn.ensemble import GradientBoostingRegressor [as 别名]
# 或者: from sklearn.ensemble.GradientBoostingRegressor import name [as 别名]
X5_columns = data_converted5.columns.drop(['log_PAX','DateOfDeparture'])
y5 = data_converted5['log_PAX'].values
#Sixth input : added the total number of passenger per airport per month
data_completed6 = airports_monthly_traffic(data)
data_converted6 = dummy_converter(data_completed6)
X6 = data_converted6.drop(['log_PAX','DateOfDeparture'], axis=1).values
X6_columns = data_converted6.columns.drop(['log_PAX','DateOfDeparture'])
y6 = data_converted6['log_PAX'].values
#%%
params = {'n_estimators': 150, 'max_depth': 10, 'min_samples_split': 3,'learning_rate': 0.1, 'loss': 'ls', 'max_features' : "auto"}
reg0 = GradientBoostingRegressor(**params)
reg0.name="GBR with no additional data"
reg1 = GradientBoostingRegressor(**params)
reg1.name="GBR with all geographical data"
reg2 = GradientBoostingRegressor(**params)
reg2.name="GBR with airport distance data"
reg3 = GradientBoostingRegressor(**params)
reg3.name="GBR with meteo data"
reg4 = GradientBoostingRegressor(**params)
reg4.name="GBR with accidents data"
reg5 = GradientBoostingRegressor(**params)
reg5.name="GBR with year flux"
reg6 = GradientBoostingRegressor(**params)
reg6.name="GBR with month flux"
X0_train, X0_test, y0_train, y0_test = train_test_split(X0, y0, test_size=0.2,random_state=1)
X1_train, X1_test, y1_train, y1_test = train_test_split(X1, y1, test_size=0.2,random_state=1)