# 25th place solution Thanks Kaggle and H&M for hosting the really exciting competition. This is my first time where I devoted significant portion of my spare time on Kaggle platform, and I learned a lot from this competition. I appreciate all the great notebooks and dicussions, which have helped me a lot construct my strategy. My strategy was relatively simple, did nothing special, just followed the [@paweljankiewicz](https://www.kaggle.com/paweljankiewicz) ‘s great suggestions . Candidate generation repurchase (still wonder why this is so important in this competition though…) Several collaborative filtering ItemkNN Randomwalk with restart Matrix factorization with negative sampling For ItemkNN, I used all the transactions with decaying weight as the timesamp goes past. This weighting reduces cold users while maintaining the recall. ItemkNN gave me the largest gain. I use Julia languate to implement them Candidates from (global/segmented) popular items also help Reranking The model is LightGBM LambdaMART and the features are based on popularity, user-item interaction and trending. This part is probably similar to many competitors. Rank features (rank of the item in generated candidates) are important. As I increased candidates, it became more and more important to adjust positive sample ratio and sampling negatives to deal with the label imbalance (in fact there are several dicussions to suggest this) My environment At first, I used cudf with the notebook instance attached with a GPU As I generated more and more candidates and features, even cudf got difficulty to handle such a large table, so I swithced to the Google BigQuery. I moved all my preprocess codes to SQLs. BigQuery provides me much more scalable way to handle tabular data. Since I started to focus on this competition at the bigining of the April, I had only a month to tackle on. After switching to BigQuery, I also moved to GCP vertex training, run lots of experiments in parallel with on-demand high-memory machine (finally with 512GB RAM). It was really useful to perform many trails-and-errors. My best model is CV: 0.03861 Public: 0.03225 Private: 0.03252 Thanks.