Skip to content

Commit

Permalink
remove_drop_and_other_comments_jose
Browse files Browse the repository at this point in the history
  • Loading branch information
elephaint committed Nov 14, 2024
1 parent 915719e commit 477be47
Show file tree
Hide file tree
Showing 12 changed files with 1,622 additions and 1,660 deletions.
8 changes: 4 additions & 4 deletions action_files/test_models/src/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import pickle
import pandas as pd

os.environ['NIXTLA_ID_AS_COL'] = '1'

from statsforecast.models import AutoETS
from statsforecast.core import StatsForecast

Expand Down Expand Up @@ -35,9 +37,7 @@ def get_data():
spec = [
['Country'],
['Country', 'State'],
# ['Country', 'Purpose'],
['Country', 'State', 'Region'],
# ['Country', 'State', 'Purpose'],
['Country', 'State', 'Region', 'Purpose']
]

Expand All @@ -49,8 +49,8 @@ def get_data():

sf = StatsForecast(models=[AutoETS(season_length=4, model='ZZA')],
freq='QS', n_jobs=-1)
Y_hat_df = sf.forecast(df=Y_train_df, h=8, fitted=True).reset_index()
Y_fitted_df = sf.forecast_fitted_values().reset_index()
Y_hat_df = sf.forecast(df=Y_train_df, h=8, fitted=True)
Y_fitted_df = sf.forecast_fitted_values()

# Save Data
if not os.path.exists('./data'):
Expand Down
2 changes: 1 addition & 1 deletion action_files/test_models/src/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def evaluate():
evaluation = evaluation.query("level != 'Overall'").set_index(['level', 'metric'])

evaluation.columns = ['Base'] + models
evaluation = evaluation.applymap('{:.2f}'.format)
evaluation = evaluation.map('{:.2f}'.format)
return evaluation


Expand Down
2 changes: 1 addition & 1 deletion action_files/test_models/src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ERM,
)

from src.data import get_data
from data import get_data


def main():
Expand Down
583 changes: 366 additions & 217 deletions hierarchicalforecast/core.py

Large diffs are not rendered by default.

244 changes: 144 additions & 100 deletions hierarchicalforecast/evaluation.py

Large diffs are not rendered by default.

Loading

0 comments on commit 477be47

Please sign in to comment.