I'm working on a time series problem and would appreciate advice from the community. My goal is to predict the sales volume ordered per customer, per product family, for the next 2-4-6 weeks. The data is aggregated by customer, product group, and week of the year.
Here’s the approach I’ve taken so far:
- I expanded the data to create a full time series for each customer, based on their first and last purchase dates. This resulted in many weeks with 0 sales, which I believe is informative since the absence of orders is valuable information in this context.
- I’m working with a complex customer base of over 2500 customers. Some order frequently (e.g., daily), others every few days, and there are seasonal customers who only purchase for a few weeks in the year. When I aggregate data across all customers, the time series appears stationary (based on ACF and PACF plots). However, when I analyze individual customers, there’s a mix of stationary and non-stationary patterns.
- I implemented an XGBoost model and achieved an R² score of 0.9, but I suspect these numbers are inflated due to many small predictions for weeks where sales are 0. I’m now experimenting with a 2-step model: first classifying whether a sale will happen, then predicting the sales volume for those positive instances.
Given the variability and complexity of the customer base, I’m unsure about the best modeling approach. Training separate models per customer isn’t feasible given the large number of customers.
My questions:
- How should I best handle the mixed patterns of stationary and non-stationary customers? Is there a way to balance this in a single model?
- Are there any best practices for handling the 0-sales weeks in time series forecasting without inflating performance metrics like R²?
- Does the 2-step classification-regression model sound like a good approach for this problem, or would another method be more suitable for such a varied customer base?
Any advice or suggestions would be greatly appreciated! Thank you in advance.
Edit: From a business perspective, the goal of the project is not just to forecast volume, but to detect churn or declining orders—at the level of individual customers and product families. Customers may stop buying one product group but continue buying others, so focusing on both customer and product is crucial. The business has little visibility into when and how churn happens. My idea was to forecast sales volume and compare it with historical trends. If we observe a declining trend in sales, it would trigger action to reach out to the customer before potential churn fully occurs.
Given the variability and complexity of the customer base, I’m unsure about the best modeling approach.