Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make exception a warning for non-standard biz days #63

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tablespoon/forecasters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pandas as pd
import statsmodels.api as sm
from scipy.stats import norm
import warnings


def get_sorted_dates(df_historical):
Expand Down Expand Up @@ -46,7 +47,7 @@ def check_historical_dates_are_contiguous(
remaining_dates = expected_dates.difference(given_dates)
# print(remaining_dates)
if len(check_dates) != len(history_dates):
raise Exception(
warning_message = (
"The series starts on "
+ str(min_date)
+ " and ends on "
Expand All @@ -57,6 +58,7 @@ def check_historical_dates_are_contiguous(
+ str(len(history_dates))
+ " was found "
)
warnings.warn(warning_message, UserWarning)


class Naive(object):
Expand Down
Loading