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

Optimizing the training result #2545

Open
hadis-h opened this issue Jan 16, 2024 · 0 comments
Open

Optimizing the training result #2545

hadis-h opened this issue Jan 16, 2024 · 0 comments

Comments

@hadis-h
Copy link

hadis-h commented Jan 16, 2024

I am new in time-series forecasting with Prophet, Currently, I am doing forecasting for the number of sales, I don't get really good results with Prophet, my dataset doesn't have a specific trend and has random spikes:

Figure_1

Here is the result of my training and testing, I am getting very high errors in testing, I tried to give the spike as a holiday, the blue line is the training result, the black line is the measurement, the yellow line is the testing result and the green line is the actual data. Also, I add this to my model:

model = Prophet(changepoint_prior_scale=0.08,
seasonality_prior_scale=0.6,
weekly_seasonality=False,
daily_seasonality=False,
yearly_seasonality=True,
seasonality_mode = "additive",
holidays=holidays)

This is also the result for the components plot:

Figure_2

I have many questions and it would be great if help me figure out how can I improve my accuracy.

  1. The line of change points (red) is smooth, should I adjust the change points by myself ?, so the model works better because there are so many changing points that Prophet cannot detect.
  2. If the answer to the first question is yes! how can I do it? In the documentation, it is written, is better the model does it automatically, so I didn't change it.
  3. Does Prophet work well in these types of datasets which have randomly increasing and decreasing?

I want to have high accuracy as much as possible:
This is my result for accuracy:
cutoffs = pd.to_datetime(["2019-12"])

df_cv2 = cross_validation(model, cutoffs=cutoffs,horizon="365 days")

df_p = performance_metrics(df_cv2)

Screenshot 2024-01-16 at 16 24 14

The result of mse for testing is 398 which is extremely high.

I would appreciate any suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant