-
Notifications
You must be signed in to change notification settings - Fork 40
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
Data size impacting tune_test_forecast() and find_optimal_transformation() #68
Comments
I'm not sure why |
Thank you. I think I better let the data with weekly non-periodic data rather than summing up over one month, this would let a bigger size for the dataset. |
All else equal, having a bigger data size usually leads to better model performance. So switching to a weekly frequency may alleviate many of these problems. There is no rule to determine how many lags/how big a test size to use. Just keep in mind that every lag you add takes an observation off the beginning of the series. The 24th lag shortens the series by 24 observations. Using bigger test sizes also decreases the amount of training observations. All of these considerations need to be balanced when evaluating forecasting models. |
Hello,
In an attempt to try to deploy automatic forecasting on different dataset (the optimal goal is to try to find optimal model automatically for each input TS data), I noticed the the two functions tune_test_forecast() and find_optimal_transformation() encounters a "shape".
ValueError: Found array with 0 sample(s) (shape=(0, 45)) while a minimum of 1 is required by MinMaxScaler.
Or maybe does it has to be with the add_ar_terms ?
In the case of the following dataset, I noticed that the problem is mainly on the f.auto_forecast().
However, the
find_statistical_transformation()
works well.Dataset attached.
CODE:
`forecast_months_horizon = 18 #Select number of months to be forecasted in the future
performance_metric = "mae"
data = df
f = Forecaster(
y = data['Monthly_Ordered quantity _ basic U_M'], # required
current_dates = data['first_day_of_month'], # required
future_dates=forecast_months_horizon,
cis = False, # choose whether or not to evaluate confidence intervals for all models,
metrics = ['mae','r2','rmse','mape'], # the metrics to evaluate when testing/tuning models
)
f.add_metric(custom_metric_3)
f.set_validation_metric(performance_metric)
f.set_validation_length(int(len(f.y).2) + number_months_validation0)
f.set_test_length(int(len(f.y).25)+number_months_test0)
def forecaster_0(f):
def forecaster_1(f):
def Plot_Analysis(f):
def Plot_Forecasts(f):
#transformer, reverter = find_statistical_transformation(f)
forecaster_1(f)
Plot_Forecasts(f)`
df_A0430151.xlsx
The text was updated successfully, but these errors were encountered: