{
  "id": 516087,
  "title": "Visualizing Chemical Space (t-SNE)",
  "url": "/competitions/leash-BELKA/discussion/516087",
  "author_name": "shaurya",
  "post_date": "2024-07-01T09:27:51.805000",
  "votes": 18,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I ran t-SNE over train and test set and it shows the \"distant island\" of out-of-distribution molecules that make the task challenging.</p>\n<p>The plot was made with 40k samples from the train set and 10k samples from the test set. The SMILES were converted to Morgan Fingerprints and clustered using t-SNE.</p>\n<p>I'm also attaching a CSV with coordinates of this plot. If you colour the dots using your predictions you can visualize what your model thinks of the \"distant island\".</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1132516%2F7396721a74545ec7ac809c66019ef610%2Fbelka.png?generation=1719825498936187&amp;alt=media\"></p>",
  "messages": [
    {
      "id": 2898685,
      "postDate": "2024-07-01T09:27:51.807Z",
      "content": "<p>I ran t-SNE over train and test set and it shows the \"distant island\" of out-of-distribution molecules that make the task challenging.</p>\n<p>The plot was made with 40k samples from the train set and 10k samples from the test set. The SMILES were converted to Morgan Fingerprints and clustered using t-SNE.</p>\n<p>I'm also attaching a CSV with coordinates of this plot. If you colour the dots using your predictions you can visualize what your model thinks of the \"distant island\".</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1132516%2F7396721a74545ec7ac809c66019ef610%2Fbelka.png?generation=1719825498936187&amp;alt=media\"></p>",
      "rawMarkdown": "I ran t-SNE over train and test set and it shows the \"distant island\" of out-of-distribution molecules that make the task challenging.\n\nThe plot was made with 40k samples from the train set and 10k samples from the test set. The SMILES were converted to Morgan Fingerprints and clustered using t-SNE.\n\nI'm also attaching a CSV with coordinates of this plot. If you colour the dots using your predictions you can visualize what your model thinks of the \"distant island\".\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1132516%2F7396721a74545ec7ac809c66019ef610%2Fbelka.png?generation=1719825498936187&alt=media)",
      "votes": 17
    },
    {
      "id": 2905832,
      "postDate": "2024-07-05T07:34:39.580Z",
      "content": "<p>Thank you for sharing your analysis. Likewise, I found that non-triazine molecules formed an isolated island when I calculated Mordred descriptors for train and test compounds and reduced dimensions using t-SNE (<a href=\"https://www.kaggle.com/code/hideakiogasawara/chemspace-visualization\" target=\"_blank\">my post</a>). They must be challenging.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F178552%2Fa2e5fb55cbf6e4c28410c3a07d2f7180%2Ft-SNE.png?generation=1720422141289697&amp;alt=media\" alt=\"t-SNE of train and test molecules\"></p>",
      "rawMarkdown": "Thank you for sharing your analysis. Likewise, I found that non-triazine molecules formed an isolated island when I calculated Mordred descriptors for train and test compounds and reduced dimensions using t-SNE ([my post](https://www.kaggle.com/code/hideakiogasawara/chemspace-visualization)). They must be challenging.\n![t-SNE of train and test molecules](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F178552%2Fa2e5fb55cbf6e4c28410c3a07d2f7180%2Ft-SNE.png?generation=1720422141289697&alt=media)",
      "votes": 4
    },
    {
      "id": 2902019,
      "postDate": "2024-07-03T04:01:57.047Z",
      "content": "<p>Nice picture! I got smth similar resently in <a href=\"https://www.kaggle.com/code/antoninadolgorukova/belka-generalizability-similarity\" target=\"_blank\">this notebok</a>. I think your \"distant island\" could also be the test molecules with non-shared BBs (red in the picture below).</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12193662%2Fb0d8b5ee253b0db2c9b23932889377e9%2FScreenshot%202024-07-03%20065935.png?generation=1719979200562041&amp;alt=media\"></p>",
      "rawMarkdown": "Nice picture! I got smth similar resently in [this notebok](https://www.kaggle.com/code/antoninadolgorukova/belka-generalizability-similarity). I think your \"distant island\" could also be the test molecules with non-shared BBs (red in the picture below).\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12193662%2Fb0d8b5ee253b0db2c9b23932889377e9%2FScreenshot%202024-07-03%20065935.png?generation=1719979200562041&alt=media)",
      "votes": 4,
      "replies": [
        {
          "id": 2921169,
          "postDate": "2024-07-14T06:45:13.433Z",
          "content": "<p>Yes, I've found your notebooks helpful!</p>",
          "rawMarkdown": "Yes, I've found your notebooks helpful!",
          "votes": 1
        }
      ]
    },
    {
      "id": 2906013,
      "postDate": "2024-07-05T10:16:08.657Z",
      "content": "<p>All of the visualizations posted really bring home the \"out of distribution\" nature of the test set.  I know there is a discussion that describes the number of test compounds in each category - triazine shared BBs, triazine not shared BBs, and non-triazine -  but I can't find it now.  Does anyone recall the number in each group?</p>",
      "rawMarkdown": "All of the visualizations posted really bring home the \"out of distribution\" nature of the test set.  I know there is a discussion that describes the number of test compounds in each category - triazine shared BBs, triazine not shared BBs, and non-triazine -  but I can't find it now.  Does anyone recall the number in each group?",
      "votes": 1
    },
    {
      "id": 2899798,
      "postDate": "2024-07-01T21:05:31.663Z",
      "content": "<p>This is a really nice visualization.  Nice work!</p>",
      "rawMarkdown": "This is a really nice visualization.  Nice work!",
      "votes": 1
    },
    {
      "id": 2911195,
      "postDate": "2024-07-08T06:21:31.173Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2904874,
      "postDate": "2024-07-04T15:40:29.610Z",
      "content": "<p>Thanks for sharing this t-SNE visualization! Using the combination of t-SNE and Morgan Fingerprints is a very insightful way to analyze the chemical space. I particularly liked how you showed the distribution of molecules in the training set and the test set, clearly seeing \"distant islands\" that really reflect the challenges the model faces.</p>\n<p>The image is very clear, do you consider marking some key areas or features in the image to further help understanding?</p>\n<p>Overall, it was a very valuable share, thanks for your efforts!</p>",
      "rawMarkdown": "Thanks for sharing this t-SNE visualization! Using the combination of t-SNE and Morgan Fingerprints is a very insightful way to analyze the chemical space. I particularly liked how you showed the distribution of molecules in the training set and the test set, clearly seeing \"distant islands\" that really reflect the challenges the model faces.\n\nThe image is very clear, do you consider marking some key areas or features in the image to further help understanding?\n\nOverall, it was a very valuable share, thanks for your efforts!",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2905832,
      "author_name": "Hideaki Ogasawara",
      "author_url": "",
      "post_date": "2024-07-05T07:34:39.580000",
      "content": "<p>Thank you for sharing your analysis. Likewise, I found that non-triazine molecules formed an isolated island when I calculated Mordred descriptors for train and test compounds and reduced dimensions using t-SNE (<a href=\"https://www.kaggle.com/code/hideakiogasawara/chemspace-visualization\" target=\"_blank\">my post</a>). They must be challenging.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F178552%2Fa2e5fb55cbf6e4c28410c3a07d2f7180%2Ft-SNE.png?generation=1720422141289697&amp;alt=media\" alt=\"t-SNE of train and test molecules\"></p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 2902019,
      "author_name": "Antonina Dolgorukova",
      "author_url": "",
      "post_date": "2024-07-03T04:01:57.047000",
      "content": "<p>Nice picture! I got smth similar resently in <a href=\"https://www.kaggle.com/code/antoninadolgorukova/belka-generalizability-similarity\" target=\"_blank\">this notebok</a>. I think your \"distant island\" could also be the test molecules with non-shared BBs (red in the picture below).</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12193662%2Fb0d8b5ee253b0db2c9b23932889377e9%2FScreenshot%202024-07-03%20065935.png?generation=1719979200562041&amp;alt=media\"></p>",
      "votes": 4,
      "replies": [
        {
          "id": 2921169,
          "author_name": "shaurya",
          "author_url": "",
          "post_date": "2024-07-14T06:45:13.433000",
          "content": "<p>Yes, I've found your notebooks helpful!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2906013,
      "author_name": "KirkDCO",
      "author_url": "",
      "post_date": "2024-07-05T10:16:08.657000",
      "content": "<p>All of the visualizations posted really bring home the \"out of distribution\" nature of the test set.  I know there is a discussion that describes the number of test compounds in each category - triazine shared BBs, triazine not shared BBs, and non-triazine -  but I can't find it now.  Does anyone recall the number in each group?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2899798,
      "author_name": "KirkDCO",
      "author_url": "",
      "post_date": "2024-07-01T21:05:31.663000",
      "content": "<p>This is a really nice visualization.  Nice work!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2911195,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-07-08T06:21:31.173000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2904874,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-07-04T15:40:29.610000",
      "content": "<p>Thanks for sharing this t-SNE visualization! Using the combination of t-SNE and Morgan Fingerprints is a very insightful way to analyze the chemical space. I particularly liked how you showed the distribution of molecules in the training set and the test set, clearly seeing \"distant islands\" that really reflect the challenges the model faces.</p>\n<p>The image is very clear, do you consider marking some key areas or features in the image to further help understanding?</p>\n<p>Overall, it was a very valuable share, thanks for your efforts!</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2898685": "I ran t-SNE over train and test set and it shows the \"distant island\" of out-of-distribution molecules that make the task challenging.\n\nThe plot was made with 40k samples from the train set and 10k samples from the test set. The SMILES were converted to Morgan Fingerprints and clustered using t-SNE.\n\nI'm also attaching a CSV with coordinates of this plot. If you colour the dots using your predictions you can visualize what your model thinks of the \"distant island\".\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1132516%2F7396721a74545ec7ac809c66019ef610%2Fbelka.png?generation=1719825498936187&alt=media)",
    "2905832": "Thank you for sharing your analysis. Likewise, I found that non-triazine molecules formed an isolated island when I calculated Mordred descriptors for train and test compounds and reduced dimensions using t-SNE ([my post](https://www.kaggle.com/code/hideakiogasawara/chemspace-visualization)). They must be challenging.\n![t-SNE of train and test molecules](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F178552%2Fa2e5fb55cbf6e4c28410c3a07d2f7180%2Ft-SNE.png?generation=1720422141289697&alt=media)",
    "2902019": "Nice picture! I got smth similar resently in [this notebok](https://www.kaggle.com/code/antoninadolgorukova/belka-generalizability-similarity). I think your \"distant island\" could also be the test molecules with non-shared BBs (red in the picture below).\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F12193662%2Fb0d8b5ee253b0db2c9b23932889377e9%2FScreenshot%202024-07-03%20065935.png?generation=1719979200562041&alt=media)",
    "2906013": "All of the visualizations posted really bring home the \"out of distribution\" nature of the test set.  I know there is a discussion that describes the number of test compounds in each category - triazine shared BBs, triazine not shared BBs, and non-triazine -  but I can't find it now.  Does anyone recall the number in each group?",
    "2899798": "This is a really nice visualization.  Nice work!",
    "2911195": "",
    "2904874": "Thanks for sharing this t-SNE visualization! Using the combination of t-SNE and Morgan Fingerprints is a very insightful way to analyze the chemical space. I particularly liked how you showed the distribution of molecules in the training set and the test set, clearly seeing \"distant islands\" that really reflect the challenges the model faces.\n\nThe image is very clear, do you consider marking some key areas or features in the image to further help understanding?\n\nOverall, it was a very valuable share, thanks for your efforts!"
  }
}