Skip to content

Commit

Permalink
Fix PER, rerun notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
camirmas committed May 12, 2023
1 parent af12ce3 commit 1a6f378
Show file tree
Hide file tree
Showing 4 changed files with 660 additions and 744 deletions.
6 changes: 3 additions & 3 deletions REStats/models/wind_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
def calc_persistence(wind_dir, steps=1):
per = np.empty(len(wind_dir))

t = 0
t = 1
while t < len(wind_dir) - steps:
per[t : t + steps] = wind_dir[t]
per[t : t + steps] = wind_dir[t - 1]

t += steps

per = per[: len(wind_dir) - 1]
per = per[1 : len(wind_dir)]

per_rmse = circular_rmse(wind_dir[1:], per)
per_rmse_rel = per_rmse / circular_mean(wind_dir[1:]) * 100
Expand Down
6 changes: 3 additions & 3 deletions REStats/models/wind_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def backtest(v_train, v_test, idata_wb=None, steps=1):
def calc_persistence(v_test, steps=1):
per = np.empty(len(v_test))

t = 0
t = 1
while t < len(v_test) - steps:
per[t : t + steps] = v_test[t]
per[t : t + steps] = v_test[t - 1]

t += steps

per = per[: len(v_test) - 1]
per = per[1 : len(v_test)]

per_rmse = mean_squared_error(v_test[1:], per, squared=False)
per_rmse_rel = per_rmse / v_test[1:].mean() * 100
Expand Down
614 changes: 307 additions & 307 deletions REStats/notebooks/forecast.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 1a6f378

Please sign in to comment.