# NN and LGB solution for top 5% (and some cool graphs)

Hi guys, I created two kernels explaining how we used LGB and NN models to get a silver medal in this competition. I know it is not as cool as all the graph NNs, but might be nice for someone :)
1)
[Features for top 5% LB with NN or LGB](https://www.kaggle.com/felipemello/features-for-top-5-lb-with-nn-or-lgb)
show how we calculated the features we used. The main one that wasn't shared publicly is calculating forces resultants on the axis of atom0 to atom1. Features based on this principle were the most important to my model. Here is one:
![](assets/28cb3b9b1f838f5178f9a511.png)
2)
[NN and LGB tricks and pipeline for top 5% LB](https://www.kaggle.com/felipemello/nn-and-lgb-tricks-and-pipeline-for-top-5-lb)
describes the pipeline used. There were a few tricks that greatly boosted our score, like using
[permutation importance](https://www.kaggle.com/speedwagon/permutation-importance)
to select features and setting distance for LGB as yukawa distances (exp(-dist)/dist).
We also added some features extracted from a NN layer as features to the LGB, and they look awesome. It always impress me how beautiful neural networks are. Here is an example:
![](assets/e0f25b71edaf08d10da650fe.png)
It took a while to upload everything and detail the code, so, if you enjoy reading it somehow, consider upvoting as a reward for my time :)
Hope you guys enjoy it. Happy Kaggling.