# 12th place Writeup

First of all, I would like to thank the competition hosts.
Here I will try to summarize some of the main points of our solution.
![2022-05-10-21-39-35](assets/dc664c558c26d959c18edb18.png)
GBDT part (
[@onodera](https://www.kaggle.com/onodera)
)
[@onodera](https://www.kaggle.com/onodera)
tried to solve this recommendation task by splitting into 3 models with GBDT(XGB).
Reorder
Predict whether the customer will purchase the article which was purchased by the customer before
new item top1k
Predict whether the customer will purchase the most purchased article(top1k) in last 1 week
Other Color
Predicting whether a customer will purchase a different color of a product they have previously purchased
And then got
0.03242
on both LB by blending above outputs.
NN part ( KF )
I used E2E NN approach based on the great
[baseline notebook](https://www.kaggle.com/code/aerdem4/h-m-pure-pytorch-baseline)
published by
[@aerdem4](https://www.kaggle.com/aerdem4)
.
Learning metrics between candidate articles and transaction articles
Assign the following knowledge to the article's embedding vectors
Article meta information ID (e.g. product code)
EfficientNet image features compressed by PCA
Graph embedding using Deep Walk and Word2Vec
Training with the following classification losses.
Binary classification of whether a candidate article will be purchased or not
Top 2~5 transaction article features similar to each candidate articles
Similarity scores computed by metric learning module
Statistical features for time elapsed since last purchase
Optimize BCELoss & DiceLoss
And then got
0.298~0.303
on both LB for each single model.
NN Stacking part (
[@shimacos](https://www.kaggle.com/shimacos)
)
[@shimacos](https://www.kaggle.com/shimacos)
built 2 Stacking model from KF's many NN models with LightGBM.
By including these models, the result of weighted blend improved from 0.03377 to 0.03394.
Weighted blending ( KF )
I blended GBDT, NN, and stacked NN models using Optuna to optimize map12 directly.
And then got CV:
0.04047
, Public:
0.03389
, and Private:
0.03394
.