Skip to content

Commit

Permalink
slightly changed learning parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dPreininger committed May 4, 2022
1 parent f13822e commit c520247
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LPP Forecast - using Extreme Gradient Bossting
# LPP Forecast - using Extreme Gradient Boosting

This program forecasts the arrival times of LPP buses.

It is the same program, as the one in this repository: https://github.com/Davaxis/lpp-forecast, but uses XGBoosting instead of linear regression

tekmovanje MAE: 209.0 seconds
tekmovanje MAE: 207.4 seconds
5 changes: 3 additions & 2 deletions tekmovanje.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ def train_model(data, label='Duration'):
X1 = dataset[1].drop(label, axis=1).to_numpy()
y1 = dataset[1][label].to_numpy()

model0 = xgb.XGBRegressor(eval_metric='mae', verbosity=0, n_threads=4)
model1 = xgb.XGBRegressor(eval_metric='mae', verbosity=0, n_threads=4)
model0 = xgb.XGBRegressor(eval_metric='mae', verbosity=0, n_threads=4, max_depth=7, learning_rate=0.25)
model1 = xgb.XGBRegressor(eval_metric='mae', verbosity=0, n_threads=4, max_depth=7, learning_rate=0.25)
model0.fit(X0, y0)
model1.fit(X1, y1)
models[route] = {0: model0, 1: model1}
Expand Down Expand Up @@ -178,4 +178,5 @@ def create_output(data, departures, filename='out.txt'):
models = train_model(train_datasets)
pred = predict(models, test_data)
create_output(pred, departures_test)
print('done')

0 comments on commit c520247

Please sign in to comment.