{
  "id": 106263,
  "title": "42nd Solution, explanations and apologies",
  "url": "/competitions/champs-scalar-coupling/discussion/106263",
  "author_name": "Nanashi",
  "post_date": "2019-08-29T00:13:24.316000",
  "votes": 27,
  "comment_count": 11,
  "views": 0,
  "content": "<p>Fisrt of all, I'd like to apologize for what happened last week, the leaked -2.163 submission ... also thank my mates and <a href=\"/inversion\">@inversion</a>  for understanding the situation and reacting quickly.</p>\n\n<p>It's surreal, I know, days later I read the posts and many people didn't understand why it had happened or what reasons I would have to do it. It's very surrealistic, I am sure the first kaggler that filters a top50 solution while in the bathroom pooping (not a joke). Now when I remember it I laugh, but at that moment I felt really really bad. I submit, go to the bathroom, come back and see my teammates are calling me desperate...</p>\n\n<p>I write this post in order to prove our solution is legit, explain it and show our code.</p>\n\n<p>I didn't hide my mistake and communicated it as quickly as I could to the community and administrators, and I pointed out who had used it and forked it.</p>\n\n<p>I don't know what happened that night, I think I edited a kernel that was already public, or because I am used to sharing kernels I didn't read the message when I invited my mates and clicked to accept... I don't know.</p>\n\n<p>A lot of people shared different opinions, and I tought about it... I remember the post <a href=\"https://www.kaggle.com/product-feedback/83351\">Disallow Deleting Topics</a> by <a href=\"/brandenkmurray\">@brandenkmurray</a> , there are a lot of deleted posts in these forums and using posts you can share almost the same information as kernels (code, pictures, descriptions etc) ... (it's just a opinion, I think it's also a big problem and I thought about it after reading all the messages).\nI resent the fact that many people think I leaked it on purpose or that it's a case of private sharing, because I hate private sharing and believe in fair competitions, but at the same time I understand those persons because this is surreal.</p>\n\n<p>I just wanted to apologize with the community, hosts and my mates... and share my point of view.\nI hope you have obtained great results, or at least according to the time you have dedicated to the competition, and I also hope that you have not been affected by the leak.</p>\n\n<p>best,\nMarcos.</p>\n\n<hr>\n\n<h3>Base</h3>\n\n<p>The -2.163 submission was a simple median of 4 files, the names of the files were self-descriptive, like <em>lgbm1945.csv</em>, the models were :</p>\n\n<p>|  model  | LB  | \n|---|---|\n|lgbm   |  -1.945 |   |\n| mpnn  |  -1.884  |   |\n| semGCN  | -1.830  |   |</p>\n\n<p><strong>why didn't we open sourced the solution?</strong>\nTeam decision, I would like but we had 3 big problems:\n1. We couldn't reproduce results</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F2818de1aed80ee79651f428d131e7c53%2FScreenshot%20from%202019-08-29%2000-11-39.png?generation=1567030811963445&amp;alt=media\" alt=\"\"></p>\n\n<p>The people who forked the kernel can check that we used those subs for stacking, but we did those subs 1 month ago... (I wasn't even member of the team) we couldn't reproduce those results, semgcn is a python script (no checkpoints, no github, just a local run).\n2. I read about that idea on Friday (next day afternoon) and I was very busy, I couldn't prepare all the code + continue competition... and then all the problems with kaggle kernels +  we couldn't reproduce results.\n3. If we open sourced the solution, people would use the submission without running the code and using the excuse: nono, we generated this file using the open source solution (at least that what we tought)</p>\n\n<h3>Features</h3>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2Fc7a27bb40ebfeb48f2f68ddd76e57f97%2FScreenshot_from_2019-08-25_09-42-58.png?generation=1567037089996198&amp;alt=media\" alt=\"\"></p>\n\n<p>I read the posts and papers, watched some youtube videos and my knowledge in biochemistry and bioinformatics.\n- Distances and Angles (bond angles and dihedral angles). The distance between C-C bond is very important.\n- Bond type\n- Number of atoms, number of neighbors of each ...\n- Hybridization (aromatization, atom__type, electronegativity, valences) in the theory are equivalent.\n&gt; C3 = carbon sp3 = more electronegative than carbon2</p>\n\n<p>Important <a href=\"https://www.kaggle.com/c/champs-scalar-coupling/discussion/104241#latest-606224\">Is 1JHC really one class</a>\n&gt; Giba: The two groups are easily splited setting a threshold in 1J coupling distance to 1.065.</p>\n\n<p>The reason is this:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F4cef58f29e1062c9271e1b17e9bc80f9%2FScreenshot_from_2019-08-25_09-43-22.png?generation=1567037089834080&amp;alt=media\" alt=\"\"></p>\n\n<p>So we started to count those substituents using this <a href=\"http://rdkit.org/docs_temp/source/rdkit.Chem.Fragments.html\">rdkit.Chem.Fragments</a> (Number of aromatic nitrogens, Number of carboxylic acids etc)</p>\n\n<h3>Things that didn't work</h3>\n\n<ul>\n<li><p><strong>SchNet</strong> I improved this amazing baseline and we could get -1.61 with only 25 epochs, but we faced 2 problems:</p>\n\n<ol><li>Time, needs loong epochs, and we only had 1 kaggle gpu (MPNN was running on GCP already)</li>\n<li>Initialization, random_state, nobbie error... the results vary greatly depending on the initial configuration and we forgot to set random seed.</li></ol></li>\n<li><p><strong>Karplus Ecuation</strong></p></li>\n</ul>\n\n<p>Bothner-By equation\nJHH = 7 -cos Θ + 5 cos 2Θ</p>\n\n<p>where Θ is the torsion angle ... the problem wasn't obtain those angles, the problem was that I checked openbabel and RDKit and were not well calculated! For example we have CH4 (1st molecule)\nEven the bond angles, I tried with water H20 and insted of 104.5 I obtained random results like: 122, 97...\nI read about it <a href=\"https://www.rdkit.org/docs/GettingStartedInPython.html\">here</a> and in the case of RDKit, it uses an algorithm based on distance geometry for conorming molecules from 3D (xyz), probably that's the reason :(</p>\n\n<p>&gt; Note that the conformations that result from this procedure tend to be fairly ugly. They should be cleaned up using a force field. This can be done within the RDKit using its implementation of the Universal Force Field (UFF).</p>\n\n<h3>Final submission and postprocessing</h3>\n\n<p>|  model  | LB  | \n|---|---|\n|lgbm   |  -2.103 |   |\n| mpnn  |  -2.24  |   |\n| NN  | -2.11  |   |</p>\n\n<p>btw, we just realized about this (private scores):</p>\n\n<p>|  single model  | LB private | \n|---|---|\n|lgbm   |  -2.252 |   |\n| NN  | -2.134  |   |</p>\n\n<p>Median stacking + <strong>Lasso</strong> regression in order to smooth/round the predictions</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F642260d3a87b56078ba639a7a6cbf216%2FScreenshot%20from%202019-08-29%2002-11-15.png?generation=1567037508316091&amp;alt=media\" alt=\"\"></p>\n\n<h3>Models and Code</h3>\n\n<ul>\n<li>We used the thread <a href=\"https://www.kaggle.com/c/champs-scalar-coupling/discussion/93972#latest-602628\">Which graph CNN is the best (with starter kit at LB -1.469)?</a> as baseline for the GNN, all credits to <a href=\"/hengck23\">@hengck23</a> (<strong>note:</strong> we did several changes).</li>\n<li>NN based on <a href=\"https://www.kaggle.com/xwxw2929/keras-neural-net-and-distance-features\">Keras Neural Net and Distance Features</a> by <a href=\"/xwxw2929\">@xwxw2929</a> </li>\n<li>LGBM based on <a href=\"https://www.kaggle.com/criskiev/distance-is-all-you-need-lb-1-481\">Distance - is all you need. LB -1.481</a> by <a href=\"/criskiev\">@criskiev</a> </li>\n</ul>\n\n<p>other important kernels:\n- <a href=\"https://www.kaggle.com/toshik/schnet-starter-kit\">SchNet Starter Kit</a> by <a href=\"/toshik\">@toshik</a> \n- <a href=\"https://www.kaggle.com/sunhwan/using-rdkit-for-atomic-feature-and-visualization\">Using RDKit for Atomic Feature and Visualization</a> by <a href=\"/sunhwan\">@sunhwan</a> \n- <a href=\"https://www.kaggle.com/jmtest/molecule-with-openbabel\">Molecule with OpenBabel</a> by <a href=\"/jmtest\">@jmtest</a> </p>\n\n<p><strong>Code and datasets</strong></p>\n\n<ul>\n<li><p><a href=\"https://github.com/mv-lab/CHAMPS-Kaggle19\">github</a></p></li>\n<li><p>Our single model LGBM has private score -2.242\n<a href=\"https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54\">Single LGBM -2.242 = Top54 </a></p></li>\n<li><p><a href=\"https://www.kaggle.com/jesucristo/mol-features\">dataset with features</a></p></li>\n<li><p><a href=\"https://www.kaggle.com/jesucristo/molsubs\">dataset with submissions</a></p></li>\n</ul>",
  "messages": [
    {
      "id": 610689,
      "postDate": "2019-08-29T00:13:24.317Z",
      "content": "<p>Fisrt of all, I'd like to apologize for what happened last week, the leaked -2.163 submission ... also thank my mates and <a href=\"/inversion\">@inversion</a>  for understanding the situation and reacting quickly.</p>\n\n<p>It's surreal, I know, days later I read the posts and many people didn't understand why it had happened or what reasons I would have to do it. It's very surrealistic, I am sure the first kaggler that filters a top50 solution while in the bathroom pooping (not a joke). Now when I remember it I laugh, but at that moment I felt really really bad. I submit, go to the bathroom, come back and see my teammates are calling me desperate...</p>\n\n<p>I write this post in order to prove our solution is legit, explain it and show our code.</p>\n\n<p>I didn't hide my mistake and communicated it as quickly as I could to the community and administrators, and I pointed out who had used it and forked it.</p>\n\n<p>I don't know what happened that night, I think I edited a kernel that was already public, or because I am used to sharing kernels I didn't read the message when I invited my mates and clicked to accept... I don't know.</p>\n\n<p>A lot of people shared different opinions, and I tought about it... I remember the post <a href=\"https://www.kaggle.com/product-feedback/83351\">Disallow Deleting Topics</a> by <a href=\"/brandenkmurray\">@brandenkmurray</a> , there are a lot of deleted posts in these forums and using posts you can share almost the same information as kernels (code, pictures, descriptions etc) ... (it's just a opinion, I think it's also a big problem and I thought about it after reading all the messages).\nI resent the fact that many people think I leaked it on purpose or that it's a case of private sharing, because I hate private sharing and believe in fair competitions, but at the same time I understand those persons because this is surreal.</p>\n\n<p>I just wanted to apologize with the community, hosts and my mates... and share my point of view.\nI hope you have obtained great results, or at least according to the time you have dedicated to the competition, and I also hope that you have not been affected by the leak.</p>\n\n<p>best,\nMarcos.</p>\n\n<hr>\n\n<h3>Base</h3>\n\n<p>The -2.163 submission was a simple median of 4 files, the names of the files were self-descriptive, like <em>lgbm1945.csv</em>, the models were :</p>\n\n<p>|  model  | LB  | \n|---|---|\n|lgbm   |  -1.945 |   |\n| mpnn  |  -1.884  |   |\n| semGCN  | -1.830  |   |</p>\n\n<p><strong>why didn't we open sourced the solution?</strong>\nTeam decision, I would like but we had 3 big problems:\n1. We couldn't reproduce results</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F2818de1aed80ee79651f428d131e7c53%2FScreenshot%20from%202019-08-29%2000-11-39.png?generation=1567030811963445&amp;alt=media\" alt=\"\"></p>\n\n<p>The people who forked the kernel can check that we used those subs for stacking, but we did those subs 1 month ago... (I wasn't even member of the team) we couldn't reproduce those results, semgcn is a python script (no checkpoints, no github, just a local run).\n2. I read about that idea on Friday (next day afternoon) and I was very busy, I couldn't prepare all the code + continue competition... and then all the problems with kaggle kernels +  we couldn't reproduce results.\n3. If we open sourced the solution, people would use the submission without running the code and using the excuse: nono, we generated this file using the open source solution (at least that what we tought)</p>\n\n<h3>Features</h3>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2Fc7a27bb40ebfeb48f2f68ddd76e57f97%2FScreenshot_from_2019-08-25_09-42-58.png?generation=1567037089996198&amp;alt=media\" alt=\"\"></p>\n\n<p>I read the posts and papers, watched some youtube videos and my knowledge in biochemistry and bioinformatics.\n- Distances and Angles (bond angles and dihedral angles). The distance between C-C bond is very important.\n- Bond type\n- Number of atoms, number of neighbors of each ...\n- Hybridization (aromatization, atom__type, electronegativity, valences) in the theory are equivalent.\n&gt; C3 = carbon sp3 = more electronegative than carbon2</p>\n\n<p>Important <a href=\"https://www.kaggle.com/c/champs-scalar-coupling/discussion/104241#latest-606224\">Is 1JHC really one class</a>\n&gt; Giba: The two groups are easily splited setting a threshold in 1J coupling distance to 1.065.</p>\n\n<p>The reason is this:</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F4cef58f29e1062c9271e1b17e9bc80f9%2FScreenshot_from_2019-08-25_09-43-22.png?generation=1567037089834080&amp;alt=media\" alt=\"\"></p>\n\n<p>So we started to count those substituents using this <a href=\"http://rdkit.org/docs_temp/source/rdkit.Chem.Fragments.html\">rdkit.Chem.Fragments</a> (Number of aromatic nitrogens, Number of carboxylic acids etc)</p>\n\n<h3>Things that didn't work</h3>\n\n<ul>\n<li><p><strong>SchNet</strong> I improved this amazing baseline and we could get -1.61 with only 25 epochs, but we faced 2 problems:</p>\n\n<ol><li>Time, needs loong epochs, and we only had 1 kaggle gpu (MPNN was running on GCP already)</li>\n<li>Initialization, random_state, nobbie error... the results vary greatly depending on the initial configuration and we forgot to set random seed.</li></ol></li>\n<li><p><strong>Karplus Ecuation</strong></p></li>\n</ul>\n\n<p>Bothner-By equation\nJHH = 7 -cos Θ + 5 cos 2Θ</p>\n\n<p>where Θ is the torsion angle ... the problem wasn't obtain those angles, the problem was that I checked openbabel and RDKit and were not well calculated! For example we have CH4 (1st molecule)\nEven the bond angles, I tried with water H20 and insted of 104.5 I obtained random results like: 122, 97...\nI read about it <a href=\"https://www.rdkit.org/docs/GettingStartedInPython.html\">here</a> and in the case of RDKit, it uses an algorithm based on distance geometry for conorming molecules from 3D (xyz), probably that's the reason :(</p>\n\n<p>&gt; Note that the conformations that result from this procedure tend to be fairly ugly. They should be cleaned up using a force field. This can be done within the RDKit using its implementation of the Universal Force Field (UFF).</p>\n\n<h3>Final submission and postprocessing</h3>\n\n<p>|  model  | LB  | \n|---|---|\n|lgbm   |  -2.103 |   |\n| mpnn  |  -2.24  |   |\n| NN  | -2.11  |   |</p>\n\n<p>btw, we just realized about this (private scores):</p>\n\n<p>|  single model  | LB private | \n|---|---|\n|lgbm   |  -2.252 |   |\n| NN  | -2.134  |   |</p>\n\n<p>Median stacking + <strong>Lasso</strong> regression in order to smooth/round the predictions</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F642260d3a87b56078ba639a7a6cbf216%2FScreenshot%20from%202019-08-29%2002-11-15.png?generation=1567037508316091&amp;alt=media\" alt=\"\"></p>\n\n<h3>Models and Code</h3>\n\n<ul>\n<li>We used the thread <a href=\"https://www.kaggle.com/c/champs-scalar-coupling/discussion/93972#latest-602628\">Which graph CNN is the best (with starter kit at LB -1.469)?</a> as baseline for the GNN, all credits to <a href=\"/hengck23\">@hengck23</a> (<strong>note:</strong> we did several changes).</li>\n<li>NN based on <a href=\"https://www.kaggle.com/xwxw2929/keras-neural-net-and-distance-features\">Keras Neural Net and Distance Features</a> by <a href=\"/xwxw2929\">@xwxw2929</a> </li>\n<li>LGBM based on <a href=\"https://www.kaggle.com/criskiev/distance-is-all-you-need-lb-1-481\">Distance - is all you need. LB -1.481</a> by <a href=\"/criskiev\">@criskiev</a> </li>\n</ul>\n\n<p>other important kernels:\n- <a href=\"https://www.kaggle.com/toshik/schnet-starter-kit\">SchNet Starter Kit</a> by <a href=\"/toshik\">@toshik</a> \n- <a href=\"https://www.kaggle.com/sunhwan/using-rdkit-for-atomic-feature-and-visualization\">Using RDKit for Atomic Feature and Visualization</a> by <a href=\"/sunhwan\">@sunhwan</a> \n- <a href=\"https://www.kaggle.com/jmtest/molecule-with-openbabel\">Molecule with OpenBabel</a> by <a href=\"/jmtest\">@jmtest</a> </p>\n\n<p><strong>Code and datasets</strong></p>\n\n<ul>\n<li><p><a href=\"https://github.com/mv-lab/CHAMPS-Kaggle19\">github</a></p></li>\n<li><p>Our single model LGBM has private score -2.242\n<a href=\"https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54\">Single LGBM -2.242 = Top54 </a></p></li>\n<li><p><a href=\"https://www.kaggle.com/jesucristo/mol-features\">dataset with features</a></p></li>\n<li><p><a href=\"https://www.kaggle.com/jesucristo/molsubs\">dataset with submissions</a></p></li>\n</ul>",
      "rawMarkdown": "Fisrt of all, I'd like to apologize for what happened last week, the leaked -2.163 submission ... also thank my mates and @inversion  for understanding the situation and reacting quickly.\n\nIt's surreal, I know, days later I read the posts and many people didn't understand why it had happened or what reasons I would have to do it. It's very surrealistic, I am sure the first kaggler that filters a top50 solution while in the bathroom pooping (not a joke). Now when I remember it I laugh, but at that moment I felt really really bad. I submit, go to the bathroom, come back and see my teammates are calling me desperate...\n\nI write this post in order to prove our solution is legit, explain it and show our code.\n\nI didn't hide my mistake and communicated it as quickly as I could to the community and administrators, and I pointed out who had used it and forked it.\n\nI don't know what happened that night, I think I edited a kernel that was already public, or because I am used to sharing kernels I didn't read the message when I invited my mates and clicked to accept... I don't know.\n\nA lot of people shared different opinions, and I tought about it... I remember the post [Disallow Deleting Topics](https://www.kaggle.com/product-feedback/83351) by @brandenkmurray , there are a lot of deleted posts in these forums and using posts you can share almost the same information as kernels (code, pictures, descriptions etc) ... (it's just a opinion, I think it's also a big problem and I thought about it after reading all the messages).\nI resent the fact that many people think I leaked it on purpose or that it's a case of private sharing, because I hate private sharing and believe in fair competitions, but at the same time I understand those persons because this is surreal.\n\nI just wanted to apologize with the community, hosts and my mates... and share my point of view.\nI hope you have obtained great results, or at least according to the time you have dedicated to the competition, and I also hope that you have not been affected by the leak.\n\nbest,\nMarcos.\n\n----\n\n### Base\n\nThe -2.163 submission was a simple median of 4 files, the names of the files were self-descriptive, like *lgbm1945.csv*, the models were :\n\n|  model  | LB  | \n|---|---|\n|lgbm   |  -1.945 |   |\n| mpnn  |  -1.884  |   |\n| semGCN  | -1.830  |   |\n\n**why didn't we open sourced the solution?**\nTeam decision, I would like but we had 3 big problems:\n1. We couldn't reproduce results\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F2818de1aed80ee79651f428d131e7c53%2FScreenshot%20from%202019-08-29%2000-11-39.png?generation=1567030811963445&amp;alt=media)\n\nThe people who forked the kernel can check that we used those subs for stacking, but we did those subs 1 month ago... (I wasn't even member of the team) we couldn't reproduce those results, semgcn is a python script (no checkpoints, no github, just a local run).\n2. I read about that idea on Friday (next day afternoon) and I was very busy, I couldn't prepare all the code + continue competition... and then all the problems with kaggle kernels +  we couldn't reproduce results.\n3. If we open sourced the solution, people would use the submission without running the code and using the excuse: nono, we generated this file using the open source solution (at least that what we tought)\n\n### Features\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2Fc7a27bb40ebfeb48f2f68ddd76e57f97%2FScreenshot_from_2019-08-25_09-42-58.png?generation=1567037089996198&amp;alt=media)\n\nI read the posts and papers, watched some youtube videos and my knowledge in biochemistry and bioinformatics.\n- Distances and Angles (bond angles and dihedral angles). The distance between C-C bond is very important.\n- Bond type\n- Number of atoms, number of neighbors of each ...\n- Hybridization (aromatization, atom__type, electronegativity, valences) in the theory are equivalent.\n&gt; C3 = carbon sp3 = more electronegative than carbon2\n\nImportant [Is 1JHC really one class](https://www.kaggle.com/c/champs-scalar-coupling/discussion/104241#latest-606224)\n&gt; Giba: The two groups are easily splited setting a threshold in 1J coupling distance to 1.065.\n\nThe reason is this:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F4cef58f29e1062c9271e1b17e9bc80f9%2FScreenshot_from_2019-08-25_09-43-22.png?generation=1567037089834080&amp;alt=media)\n\nSo we started to count those substituents using this [rdkit.Chem.Fragments](http://rdkit.org/docs_temp/source/rdkit.Chem.Fragments.html) (Number of aromatic nitrogens, Number of carboxylic acids etc)\n\n### Things that didn't work\n\n- **SchNet** I improved this amazing baseline and we could get -1.61 with only 25 epochs, but we faced 2 problems:\n       1. Time, needs loong epochs, and we only had 1 kaggle gpu (MPNN was running on GCP already)\n       2. Initialization, random_state, nobbie error... the results vary greatly depending on the initial configuration and we forgot to set random seed.\n\n- **Karplus Ecuation**\n\nBothner-By equation\nJHH = 7 -cos Θ + 5 cos 2Θ\n\nwhere Θ is the torsion angle ... the problem wasn't obtain those angles, the problem was that I checked openbabel and RDKit and were not well calculated! For example we have CH4 (1st molecule)\nEven the bond angles, I tried with water H20 and insted of 104.5 I obtained random results like: 122, 97...\nI read about it [here](https://www.rdkit.org/docs/GettingStartedInPython.html) and in the case of RDKit, it uses an algorithm based on distance geometry for conorming molecules from 3D (xyz), probably that's the reason :(\n\n&gt; Note that the conformations that result from this procedure tend to be fairly ugly. They should be cleaned up using a force field. This can be done within the RDKit using its implementation of the Universal Force Field (UFF).\n\n### Final submission and postprocessing\n\n|  model  | LB  | \n|---|---|\n|lgbm   |  -2.103 |   |\n| mpnn  |  -2.24  |   |\n| NN  | -2.11  |   |\n\n\nbtw, we just realized about this (private scores):\n\n|  single model  | LB private | \n|---|---|\n|lgbm   |  -2.252 |   |\n| NN  | -2.134  |   |\n\n\nMedian stacking + **Lasso** regression in order to smooth/round the predictions\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F642260d3a87b56078ba639a7a6cbf216%2FScreenshot%20from%202019-08-29%2002-11-15.png?generation=1567037508316091&amp;alt=media)\n\n### Models and Code\n\n- We used the thread [Which graph CNN is the best (with starter kit at LB -1.469)?](https://www.kaggle.com/c/champs-scalar-coupling/discussion/93972#latest-602628) as baseline for the GNN, all credits to @hengck23 (**note:** we did several changes).\n- NN based on [Keras Neural Net and Distance Features](https://www.kaggle.com/xwxw2929/keras-neural-net-and-distance-features) by @xwxw2929 \n- LGBM based on [Distance - is all you need. LB -1.481](https://www.kaggle.com/criskiev/distance-is-all-you-need-lb-1-481) by @criskiev \n\nother important kernels:\n- [SchNet Starter Kit](https://www.kaggle.com/toshik/schnet-starter-kit) by @toshik \n- [Using RDKit for Atomic Feature and Visualization](https://www.kaggle.com/sunhwan/using-rdkit-for-atomic-feature-and-visualization) by @sunhwan \n- [Molecule with OpenBabel](https://www.kaggle.com/jmtest/molecule-with-openbabel) by @jmtest \n\n\n**Code and datasets**\n\n\n- [github](https://github.com/mv-lab/CHAMPS-Kaggle19)\n\n- Our single model LGBM has private score -2.242\n[Single LGBM -2.242 = Top54 ](https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54)\n\n- [dataset with features](https://www.kaggle.com/jesucristo/mol-features)\n\n- [dataset with submissions](https://www.kaggle.com/jesucristo/molsubs)\n",
      "votes": 26
    },
    {
      "id": 611096,
      "postDate": "2019-08-29T05:20:52.033Z",
      "content": "<blockquote>\n  <p>I am sure the first kaggler that filters a top50 solution while in the bathroom pooping </p>\n</blockquote>\n\n<p>Hmmmm . . . I wonder if we should have a badge for this.</p>",
      "rawMarkdown": "&gt; I am sure the first kaggler that filters a top50 solution while in the bathroom pooping \n\nHmmmm . . . I wonder if we should have a badge for this.",
      "votes": 10,
      "replies": [
        {
          "id": 611113,
          "postDate": "2019-08-29T05:36:16.470Z",
          "content": "<p>The worst part is that I know, and my mates know, that it's true. It's a good anecdote about my career as a Data Scientist 😂. Thank you <a href=\"/inversion\">@inversion</a> :) </p>",
          "rawMarkdown": "The worst part is that I know, and my mates know, that it's true. It's a good anecdote about my career as a Data Scientist 😂. Thank you @inversion :) ",
          "votes": 1
        }
      ]
    },
    {
      "id": 612036,
      "postDate": "2019-08-29T15:16:45.123Z",
      "content": "<p>Thanks for sharing, congrats on the result.  You don't need to apologize again and again for the kernel share.  Error is human.</p>",
      "rawMarkdown": "Thanks for sharing, congrats on the result.  You don't need to apologize again and again for the kernel share.  Error is human.",
      "votes": 3
    },
    {
      "id": 613897,
      "postDate": "2019-08-30T23:03:24.510Z",
      "content": "<p><strong>Update Kernel</strong>\nI added all the information about my features.</p>",
      "rawMarkdown": "**Update Kernel**\nI added all the information about my features.",
      "votes": -1
    },
    {
      "id": 611406,
      "postDate": "2019-08-29T08:43:33.877Z",
      "content": "<p><strong>Updated kernel</strong>\nOur single model LGBM has private score -2.242\n<a href=\"https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54\">Single LGBM -2.242 = Top54 </a></p>",
      "rawMarkdown": "**Updated kernel**\nOur single model LGBM has private score -2.242\n[Single LGBM -2.242 = Top54 ](https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54)"
    },
    {
      "id": 610734,
      "postDate": "2019-08-29T00:43:09.627Z",
      "content": "<p><a href=\"/antorsae\">@antorsae</a> Congratulations! looking forward to your solution/paper :) \nes la primera vez que veo un español tan arriiba en kaggle, espero ansioso ver como lo conseguiste :)</p>",
      "rawMarkdown": "@antorsae Congratulations! looking forward to your solution/paper :) \nes la primera vez que veo un español tan arriiba en kaggle, espero ansioso ver como lo conseguiste :)"
    },
    {
      "id": 610920,
      "postDate": "2019-08-29T02:57:56.260Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 612026,
      "postDate": "2019-08-29T15:11:45.363Z",
      "content": "<p>Great work. Thanks for sharing!</p>",
      "rawMarkdown": "Great work. Thanks for sharing!"
    },
    {
      "id": 611323,
      "postDate": "2019-08-29T08:01:41.183Z",
      "content": "<p>Congratulations and thanks for sharing!</p>",
      "rawMarkdown": "Congratulations and thanks for sharing!"
    },
    {
      "id": 611036,
      "postDate": "2019-08-29T04:25:58.033Z",
      "content": "<p>Congratulations! Thanks for sharing.</p>",
      "rawMarkdown": "Congratulations! Thanks for sharing."
    },
    {
      "id": 610706,
      "postDate": "2019-08-29T00:25:56.633Z",
      "content": "<p>Great! Thanks for sharing! </p>",
      "rawMarkdown": "Great! Thanks for sharing! "
    }
  ],
  "comments": [
    {
      "id": 611096,
      "author_name": "inversion",
      "author_url": "",
      "post_date": "2019-08-29T05:20:52.033000",
      "content": "<blockquote>\n  <p>I am sure the first kaggler that filters a top50 solution while in the bathroom pooping </p>\n</blockquote>\n\n<p>Hmmmm . . . I wonder if we should have a badge for this.</p>",
      "votes": 10,
      "replies": [
        {
          "id": 611113,
          "author_name": "Nanashi",
          "author_url": "",
          "post_date": "2019-08-29T05:36:16.470000",
          "content": "<p>The worst part is that I know, and my mates know, that it's true. It's a good anecdote about my career as a Data Scientist 😂. Thank you <a href=\"/inversion\">@inversion</a> :) </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 612036,
      "author_name": "CPMP",
      "author_url": "",
      "post_date": "2019-08-29T15:16:45.123000",
      "content": "<p>Thanks for sharing, congrats on the result.  You don't need to apologize again and again for the kernel share.  Error is human.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 613897,
      "author_name": "Nanashi",
      "author_url": "",
      "post_date": "2019-08-30T23:03:24.510000",
      "content": "<p><strong>Update Kernel</strong>\nI added all the information about my features.</p>",
      "votes": -1,
      "replies": []
    },
    {
      "id": 611406,
      "author_name": "Nanashi",
      "author_url": "",
      "post_date": "2019-08-29T08:43:33.877000",
      "content": "<p><strong>Updated kernel</strong>\nOur single model LGBM has private score -2.242\n<a href=\"https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54\">Single LGBM -2.242 = Top54 </a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 610734,
      "author_name": "Nanashi",
      "author_url": "",
      "post_date": "2019-08-29T00:43:09.627000",
      "content": "<p><a href=\"/antorsae\">@antorsae</a> Congratulations! looking forward to your solution/paper :) \nes la primera vez que veo un español tan arriiba en kaggle, espero ansioso ver como lo conseguiste :)</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 610920,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-08-29T02:57:56.260000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 612026,
      "author_name": "Jack nick",
      "author_url": "",
      "post_date": "2019-08-29T15:11:45.363000",
      "content": "<p>Great work. Thanks for sharing!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 611323,
      "author_name": "Stanislav Blinov",
      "author_url": "",
      "post_date": "2019-08-29T08:01:41.183000",
      "content": "<p>Congratulations and thanks for sharing!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 611036,
      "author_name": "suda",
      "author_url": "",
      "post_date": "2019-08-29T04:25:58.033000",
      "content": "<p>Congratulations! Thanks for sharing.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 610706,
      "author_name": "Alexey Kotlik",
      "author_url": "",
      "post_date": "2019-08-29T00:25:56.633000",
      "content": "<p>Great! Thanks for sharing! </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "610689": "Fisrt of all, I'd like to apologize for what happened last week, the leaked -2.163 submission ... also thank my mates and @inversion  for understanding the situation and reacting quickly.\n\nIt's surreal, I know, days later I read the posts and many people didn't understand why it had happened or what reasons I would have to do it. It's very surrealistic, I am sure the first kaggler that filters a top50 solution while in the bathroom pooping (not a joke). Now when I remember it I laugh, but at that moment I felt really really bad. I submit, go to the bathroom, come back and see my teammates are calling me desperate...\n\nI write this post in order to prove our solution is legit, explain it and show our code.\n\nI didn't hide my mistake and communicated it as quickly as I could to the community and administrators, and I pointed out who had used it and forked it.\n\nI don't know what happened that night, I think I edited a kernel that was already public, or because I am used to sharing kernels I didn't read the message when I invited my mates and clicked to accept... I don't know.\n\nA lot of people shared different opinions, and I tought about it... I remember the post [Disallow Deleting Topics](https://www.kaggle.com/product-feedback/83351) by @brandenkmurray , there are a lot of deleted posts in these forums and using posts you can share almost the same information as kernels (code, pictures, descriptions etc) ... (it's just a opinion, I think it's also a big problem and I thought about it after reading all the messages).\nI resent the fact that many people think I leaked it on purpose or that it's a case of private sharing, because I hate private sharing and believe in fair competitions, but at the same time I understand those persons because this is surreal.\n\nI just wanted to apologize with the community, hosts and my mates... and share my point of view.\nI hope you have obtained great results, or at least according to the time you have dedicated to the competition, and I also hope that you have not been affected by the leak.\n\nbest,\nMarcos.\n\n----\n\n### Base\n\nThe -2.163 submission was a simple median of 4 files, the names of the files were self-descriptive, like *lgbm1945.csv*, the models were :\n\n|  model  | LB  | \n|---|---|\n|lgbm   |  -1.945 |   |\n| mpnn  |  -1.884  |   |\n| semGCN  | -1.830  |   |\n\n**why didn't we open sourced the solution?**\nTeam decision, I would like but we had 3 big problems:\n1. We couldn't reproduce results\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F2818de1aed80ee79651f428d131e7c53%2FScreenshot%20from%202019-08-29%2000-11-39.png?generation=1567030811963445&amp;alt=media)\n\nThe people who forked the kernel can check that we used those subs for stacking, but we did those subs 1 month ago... (I wasn't even member of the team) we couldn't reproduce those results, semgcn is a python script (no checkpoints, no github, just a local run).\n2. I read about that idea on Friday (next day afternoon) and I was very busy, I couldn't prepare all the code + continue competition... and then all the problems with kaggle kernels +  we couldn't reproduce results.\n3. If we open sourced the solution, people would use the submission without running the code and using the excuse: nono, we generated this file using the open source solution (at least that what we tought)\n\n### Features\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2Fc7a27bb40ebfeb48f2f68ddd76e57f97%2FScreenshot_from_2019-08-25_09-42-58.png?generation=1567037089996198&amp;alt=media)\n\nI read the posts and papers, watched some youtube videos and my knowledge in biochemistry and bioinformatics.\n- Distances and Angles (bond angles and dihedral angles). The distance between C-C bond is very important.\n- Bond type\n- Number of atoms, number of neighbors of each ...\n- Hybridization (aromatization, atom__type, electronegativity, valences) in the theory are equivalent.\n&gt; C3 = carbon sp3 = more electronegative than carbon2\n\nImportant [Is 1JHC really one class](https://www.kaggle.com/c/champs-scalar-coupling/discussion/104241#latest-606224)\n&gt; Giba: The two groups are easily splited setting a threshold in 1J coupling distance to 1.065.\n\nThe reason is this:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F4cef58f29e1062c9271e1b17e9bc80f9%2FScreenshot_from_2019-08-25_09-43-22.png?generation=1567037089834080&amp;alt=media)\n\nSo we started to count those substituents using this [rdkit.Chem.Fragments](http://rdkit.org/docs_temp/source/rdkit.Chem.Fragments.html) (Number of aromatic nitrogens, Number of carboxylic acids etc)\n\n### Things that didn't work\n\n- **SchNet** I improved this amazing baseline and we could get -1.61 with only 25 epochs, but we faced 2 problems:\n       1. Time, needs loong epochs, and we only had 1 kaggle gpu (MPNN was running on GCP already)\n       2. Initialization, random_state, nobbie error... the results vary greatly depending on the initial configuration and we forgot to set random seed.\n\n- **Karplus Ecuation**\n\nBothner-By equation\nJHH = 7 -cos Θ + 5 cos 2Θ\n\nwhere Θ is the torsion angle ... the problem wasn't obtain those angles, the problem was that I checked openbabel and RDKit and were not well calculated! For example we have CH4 (1st molecule)\nEven the bond angles, I tried with water H20 and insted of 104.5 I obtained random results like: 122, 97...\nI read about it [here](https://www.rdkit.org/docs/GettingStartedInPython.html) and in the case of RDKit, it uses an algorithm based on distance geometry for conorming molecules from 3D (xyz), probably that's the reason :(\n\n&gt; Note that the conformations that result from this procedure tend to be fairly ugly. They should be cleaned up using a force field. This can be done within the RDKit using its implementation of the Universal Force Field (UFF).\n\n### Final submission and postprocessing\n\n|  model  | LB  | \n|---|---|\n|lgbm   |  -2.103 |   |\n| mpnn  |  -2.24  |   |\n| NN  | -2.11  |   |\n\n\nbtw, we just realized about this (private scores):\n\n|  single model  | LB private | \n|---|---|\n|lgbm   |  -2.252 |   |\n| NN  | -2.134  |   |\n\n\nMedian stacking + **Lasso** regression in order to smooth/round the predictions\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F2779868%2F642260d3a87b56078ba639a7a6cbf216%2FScreenshot%20from%202019-08-29%2002-11-15.png?generation=1567037508316091&amp;alt=media)\n\n### Models and Code\n\n- We used the thread [Which graph CNN is the best (with starter kit at LB -1.469)?](https://www.kaggle.com/c/champs-scalar-coupling/discussion/93972#latest-602628) as baseline for the GNN, all credits to @hengck23 (**note:** we did several changes).\n- NN based on [Keras Neural Net and Distance Features](https://www.kaggle.com/xwxw2929/keras-neural-net-and-distance-features) by @xwxw2929 \n- LGBM based on [Distance - is all you need. LB -1.481](https://www.kaggle.com/criskiev/distance-is-all-you-need-lb-1-481) by @criskiev \n\nother important kernels:\n- [SchNet Starter Kit](https://www.kaggle.com/toshik/schnet-starter-kit) by @toshik \n- [Using RDKit for Atomic Feature and Visualization](https://www.kaggle.com/sunhwan/using-rdkit-for-atomic-feature-and-visualization) by @sunhwan \n- [Molecule with OpenBabel](https://www.kaggle.com/jmtest/molecule-with-openbabel) by @jmtest \n\n\n**Code and datasets**\n\n\n- [github](https://github.com/mv-lab/CHAMPS-Kaggle19)\n\n- Our single model LGBM has private score -2.242\n[Single LGBM -2.242 = Top54 ](https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54)\n\n- [dataset with features](https://www.kaggle.com/jesucristo/mol-features)\n\n- [dataset with submissions](https://www.kaggle.com/jesucristo/molsubs)\n",
    "611096": "&gt; I am sure the first kaggler that filters a top50 solution while in the bathroom pooping \n\nHmmmm . . . I wonder if we should have a badge for this.",
    "612036": "Thanks for sharing, congrats on the result.  You don't need to apologize again and again for the kernel share.  Error is human.",
    "613897": "**Update Kernel**\nI added all the information about my features.",
    "611406": "**Updated kernel**\nOur single model LGBM has private score -2.242\n[Single LGBM -2.242 = Top54 ](https://www.kaggle.com/jesucristo/single-lgbm-2-242-top54)",
    "610734": "@antorsae Congratulations! looking forward to your solution/paper :) \nes la primera vez que veo un español tan arriiba en kaggle, espero ansioso ver como lo conseguiste :)",
    "610920": "",
    "612026": "Great work. Thanks for sharing!",
    "611323": "Congratulations and thanks for sharing!",
    "611036": "Congratulations! Thanks for sharing.",
    "610706": "Great! Thanks for sharing! "
  }
}