I have a data-set in the format below. I am attempting to forecast the target_value by Product_Id for an upcoming season, which is always 26 weeks in length. The main challenge is that in an upcoming season, a product may sell in a different group of stores than last season, and may be sold in a different set of weeks than a previous season (some products sell all 26 weeks, others sell in windows i.e. wk 6-13). I wanted to rely on product attributes to help determine how a product would sell in a different set of weeks/stores based on how similar products had sold in those weeks/stores.

The data is time-series and has many different products. It consists of categorical variables, numerical variables, as well as a store_id which indicates what store the sales are coming from.

Summary for data:

  • has 3 years of history, target variable is sales for a 6 month forecast horizon
  • multi-variate time series
  • consists of categorical and numerical variables
  • has products that are sold in differing time-frames (those time-frames may change in the future for the same product. i.e. last year it sold in weeks 3-10, but in the forecast horizon next year it's expected to sell in weeks 6-14)
  • has products that are sold in different stores in different time-frames (can also sell in different stores in the future forecast horizon than it has sold in in the past)
  • is sparse for subsets of products

My questions are:

  1. What is the appropriate algorithm that could handle the sparse history as well as multiple variables
  2. What is the proper way to structure the data as input into the algorithm? --For this I had planned on converting categorical variables to dummy variables, but was unsure on whether to keep time as is or convert the week to a dummy variable also since I could be forecasting different sets of weeks for different products. I had the same question for store_id.

I'm new to structuring these problems, so please forgive any errors or missing information, and let me know what additional data is needed. Any and all feedback is appreciated!

enter image description here


Welcome to the site! This is a fairly broad question and impossible to answer in a single post. So, I would have you start by researching recommender systems and algorithms. On top of that, if you fully want to take the stores into account, I would start collecting a dataset that contains attributes of each store - where are they? How many hours are they open? Do they have a lot of traffic? etc.

If you proceed by using the products, then you would research a "content-based recommender system". If you want to proceed by looking at the stores, then you would research a "community based recommender system". From there you should be able to pick a model and/or choose a hybrid of the two approaches and develop a proper solution.

Good luck!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.