include fair comparison w/ poisson regression and lightgbm by including all features

This commit is contained in:
Markus Cozowicz 2021-05-12 16:45:56 +02:00
Родитель cd7b90de27
Коммит 5e6d004e27
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -107,6 +107,8 @@ def test_nyc_bicycle():
enc.fit(x)
x = enc.transform(x)
x = np.hstack([x.todense(), bic[['HIGH_T', 'LOW_T', 'PRECIP']].values])
clf = linear_model.PoissonRegressor()
clf.fit(x[train_idx, ], y_train)
@ -118,7 +120,7 @@ def test_nyc_bicycle():
#### LightGBM
# train_data = lgb.Dataset(x, label=y, categorical_feature=[0, 1])
x = bic[['Weekday', 'HIGH_T', 'LOW_T']].values
x = bic[['Weekday', 'HIGH_T', 'LOW_T', 'PRECIP']].values
train_data = lgb.Dataset(x[train_idx, ], label=y_train, categorical_feature=[0])
model = lgb.train({