我正在尝试使用以下代码为时间序列预测做adaboost
df_store = pd.read_pickle('CA_2.pkl')
snap_feature = ['snap_'+store.split('_')[0]]
selected_columns = [column for column in df_store.columns if '7' not in column and 'rolling' not in column and 'snap' not in column and 'state' not in column]
df_store = df_store[df_store['d']>90][selected_columns+snap_feature]
x_train,y_train = df_store[df_store['d']<1914].drop(['id','store_id','sales_usd','daily_avg_sales_unit','is_weekday','units_sold'],axis=1),df_store[df_store['d']<1914]['units_sold']
x_valid,y_valid = df_store[(df_store['d']>1913) & (df_store['d']<1942)].drop(['id',df_store[(df_store['d']>1913) & (df_store['d']<1942)]['units_sold']
x_test = df_store.loc[(df_store['d']>1941 )].drop(['id',axis=1)
print("Train X and y shape")
print(x_train.shape,y_train.shape)
print("Validation X and y shape")
print(x_valid.shape,y_valid.shape)
ada_boost_reg =
AdaBoostRegressor(base_estimator=DecisionTreeRegressor(max_depth=8),n_estimators=600,random_state=42)
ada_boost_reg.fit(x_train.values,y_train.values)
val_pred = ada_boost_reg.predict(x_valid.values)
火车和验证集的形状是
Train X and y shape
(5558327,39) (5558327,)
Validation X and y shape
(85372,39) (85372,)
我已经运行了10多个小时,但是我仍然没有看到任何输出,这是内部进行任何超参数调整吗?如果可以,如何禁用它?
我也在深度1训练,这需要1:45个小时,我必须像这样训练10个数据集。
ada_boost_reg = AdaBoostRegressor(base_estimator=DecisionTreeRegressor(max_depth=1),n_estimators=800,learning_rate=0.05,random_state=42)
ada_boost_reg.fit(x_train.values,y_train.values)