# Low Memory Solution Congratulation to winners! That was a challenging competition given data set size. Like many, I am waiting for some info on the approach used by top teams. In the meantime, here is some info on my solution (18th on final LB). In order to deal with data size I decided to build one model per product id. I knew this would leave money on the table, but it was rather effective with a 16 GB machine (macbook pro). Did anyone else use the same trick? CV setting is time based. Use week 9 as validation set, and train models on weeks 6-8. Local CV is well correlated with the public LB, with an almost constant offset. Features are lag, averages on various groupings. For instance, group by agencia and route, then average sales and returns. In some cases the number of non zero values, and the std is alos computed. Then join this with the training data. More precisely, for the first half of competition, I used previous 4 weeks to build features. I used weeks 3-5 to build features for week 6, weeks 3-6 to build features for week 7, weeks 4-7 to build features for week 8, weeks 5-8 to build features for week 9, and weeks 6-9 to build features for test. Missing features in weeks 6 are treated as NaN. For CV, models were trained on weeks 6-8 with the lag features described above, and validated on week 9 with its lag features. For test predictions, weeks 7-9 with their lag features were used. This led me to 7th place at some point. I wish competition ended then ;) I then switched gear, like many, to focus on 2 weeks lag predictions; CV setting is almost the same, but one week is omitted. For instance weeks 4-6 are used to build features for week 8, week 7 is omitted. The rest is unchanged. What we lose with decomposition is cross product interactions. Two ways were used to cope with that. First, features based on groupings across products were capturing some interactions. Second, in a last pass, all products with poor local CV values were grouped to form a much smaller data set (about 2.5M entries instead of 75M). Then I could train xgboost on it. This was rather effective when predicting one week ahead, but I could not get it to work well when predicting 2 weeks ahead because of lack of time. I did not use ensembling, also because of lack of time. Time is the main issue with this approach. Local CV plus submission preparation is taking between 24 and 60 hours as there are almost 1500 models to build. This is the classical time vs memory tradeoff. However, it could scale very well on a cluster as each model can be trained concurrently with others. I will definitely look into a cluster next time! The biggest surprise to me is that the one week ahead model did as well as a the two week ahead model on private LB . Probably because my last pass was effective with the former. I did all in Python, with numpy, pandas, scikit-learn and xgboost mainly. Hope the above is of interest to readers.