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

Volatile Predictions #2600

Open
pahulhallan opened this issue Jul 25, 2024 · 1 comment
Open

Volatile Predictions #2600

pahulhallan opened this issue Jul 25, 2024 · 1 comment

Comments

@pahulhallan
Copy link

Hi all, I am using FB Prophet to model an inventory management Time series problem, basically need to predict the Sales of a specific product on a given week.
The historic data for the sales have high seasonality, e.g. Sales were 0 in all months before Feb, but in Feb they started picking up and had 250 sales at its peak;
dummy sales numbers - 0, 0, 30,60,120,250,130,28,67,0.
My projections look like 10, 15, 31000, 246, 13, 16.
Could someone guide me on why this is the case?
My guess is that the model is not being able to account for seasonality and is predicting an exponential increase in sales, in a bell curve distribution.
I don't want to artificially set the max threshold on the output, but want the model to infer it from data.
Hyperparameter tuning challenge as the same piece of code will be used to train separate models for separate products in essentially a for loop.

@broliveibr15
Copy link

Increase the number of historical data points: The FB Prophet model benefits from having a sufficient amount of historical data to identify and capture patterns and seasonality. If possible, try to gather more historical sales data to provide the model with a broader context for making accurate projections. Fine-tune the seasonality parameters: FB Prophet provides parameters to control the seasonality patterns. You can experiment with adjusting these parameters to better capture the specific seasonality in your sales data. Parameters such as 'seasonality_mode' and 'seasonality_prior_scale' can be modified to customize the model's sensitivity to seasonality. Consider adding additional regressors: FB Prophet allows for the inclusion of external regressors that may have an impact on sales, such as promotions, holidays, or marketing campaigns. Including these variables as regressors may help the model capture additional patterns and improve the accuracy of the projections. Perform hyperparameter tuning: As you mentioned, using a for loop to train separate models for different products can pose a challenge for hyperparameter tuning. However, you can try to optimize the model's hyperparameters by using techniques like cross-validation or grid search to find the best combination of parameters for each product individually. Evaluate the residuals: Assess the residuals (the differences between the actual sales and the predicted values) of the model to understand if there are any systematic patterns or trends remaining. If there are significant patterns in the residuals, it may indicate that the model is not capturing all the underlying factors impacting sales, and further adjustments or considerations may be needed.

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

2 participants