{
  "id": 304961,
  "title": "Data Distribution",
  "url": "/competitions/happy-whale-and-dolphin/discussion/304961",
  "author_name": "",
  "post_date": "2022-02-03T06:15:53.677082200Z",
  "votes": 43,
  "comment_count": 8,
  "views": 0,
  "content": "<p>One of the key challenges of this competition is that we've to identify <code>new_indiviual</code> even though they don't appear on the <strong>train</strong> data. My initial thought was that <code>new_individual</code> may look very different as they don't appear on the <strong>train</strong> data. But <strong>image embeddings</strong> tell a different story. I've published a notebook to demonstrate this analysis using <strong>T-SNE</strong>.</p>\n<h2>Notebook Link:</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/awsaf49/happywhale-data-distribution\" target=\"_blank\">Happywhale: Data Distribution 🐋🐬</a></li>\n</ul>\n<h2>Data Distribution:</h2>\n<p>To Plot <strong>image embeddings</strong> I've used using both <strong>WandB</strong> and <strong>cuML</strong>. Both of them are great libraries.   Here are some of the visualizations,</p>\n<h3>Train Vs Test:</h3>\n<div><img src=\"https://i.ibb.co/HPcfq6s/results-53-0.png\" alt=\"results-53-0\"></div>\n<h3>Whales Vs Dolphin:</h3>\n<div><img src=\"https://i.ibb.co/8BrhYPz/results-57-0.png\" alt=\"results-57-0\"></div>\n<h3>Whales Species:</h3>\n<div><img src=\"https://i.ibb.co/4j1VQYZ/results-61-0.png\" alt=\"results-61-0\"></div>\n<h3>Dolphin Species:</h3>\n<div><img src=\"https://i.ibb.co/Z2sPy5w/results-63-0.png\" alt=\"results-63-0\"></div>\n<h3>Random <strong>Train/Test</strong>:</h3>\n<p><img src=\"https://i.ibb.co/dckr4Hm/trainvtest.png\" alt=\"trainvtest\"></p>\n<h3>Random <strong>Whale/Dolphin</strong>:</h3>\n<p><img src=\"https://i.ibb.co/2sH24Xh/wvsd.png\" alt=\"wvsd\"></p>\n<h3>UMAP/PCA/TSNE using <strong>WandB</strong></h3>\n<p>We can also plot embeddings using <strong>wandb</strong>. Here's some cool plots using <strong>wandb</strong>,<br>\n<img src=\"https://i.ibb.co/W0gYY0P/w-b01.png\" alt=\"w-b01\"><br>\n<img src=\"https://i.ibb.co/G5SnMMv/w-b02.png\" alt=\"w-b02\"><br>\n<img src=\"https://i.ibb.co/1MxnZqX/w-b04.png\" alt=\"w-b04\"></p>",
  "messages": [
    {
      "id": "1673977",
      "postDate": "02/03/2022 06:15:53",
      "content": "<p>One of the key challenges of this competition is that we've to identify <code>new_indiviual</code> even though they don't appear on the <strong>train</strong> data. My initial thought was that <code>new_individual</code> may look very different as they don't appear on the <strong>train</strong> data. But <strong>image embeddings</strong> tell a different story. I've published a notebook to demonstrate this analysis using <strong>T-SNE</strong>.</p>\n<h2>Notebook Link:</h2>\n<ul>\n<li><a href=\"https://www.kaggle.com/awsaf49/happywhale-data-distribution\" target=\"_blank\">Happywhale: Data Distribution 🐋🐬</a></li>\n</ul>\n<h2>Data Distribution:</h2>\n<p>To Plot <strong>image embeddings</strong> I've used using both <strong>WandB</strong> and <strong>cuML</strong>. Both of them are great libraries.   Here are some of the visualizations,</p>\n<h3>Train Vs Test:</h3>\n<div><img src=\"https://i.ibb.co/HPcfq6s/results-53-0.png\" alt=\"results-53-0\"></div>\n<h3>Whales Vs Dolphin:</h3>\n<div><img src=\"https://i.ibb.co/8BrhYPz/results-57-0.png\" alt=\"results-57-0\"></div>\n<h3>Whales Species:</h3>\n<div><img src=\"https://i.ibb.co/4j1VQYZ/results-61-0.png\" alt=\"results-61-0\"></div>\n<h3>Dolphin Species:</h3>\n<div><img src=\"https://i.ibb.co/Z2sPy5w/results-63-0.png\" alt=\"results-63-0\"></div>\n<h3>Random <strong>Train/Test</strong>:</h3>\n<p><img src=\"https://i.ibb.co/dckr4Hm/trainvtest.png\" alt=\"trainvtest\"></p>\n<h3>Random <strong>Whale/Dolphin</strong>:</h3>\n<p><img src=\"https://i.ibb.co/2sH24Xh/wvsd.png\" alt=\"wvsd\"></p>\n<h3>UMAP/PCA/TSNE using <strong>WandB</strong></h3>\n<p>We can also plot embeddings using <strong>wandb</strong>. Here's some cool plots using <strong>wandb</strong>,<br>\n<img src=\"https://i.ibb.co/W0gYY0P/w-b01.png\" alt=\"w-b01\"><br>\n<img src=\"https://i.ibb.co/G5SnMMv/w-b02.png\" alt=\"w-b02\"><br>\n<img src=\"https://i.ibb.co/1MxnZqX/w-b04.png\" alt=\"w-b04\"></p>",
      "rawMarkdown": "One of the key challenges of this competition is that we've to identify `new_indiviual` even though they don't appear on the **train** data. My initial thought was that `new_individual` may look very different as they don't appear on the **train** data. But **image embeddings** tell a different story. I've published a notebook to demonstrate this analysis using **T-SNE**.\n\n## Notebook Link:\n* [Happywhale: Data Distribution 🐋🐬](https://www.kaggle.com/awsaf49/happywhale-data-distribution)\n\n## Data Distribution:\nTo Plot **image embeddings** I've used using both **WandB** and **cuML**. Both of them are great libraries.   Here are some of the visualizations,\n\n### Train Vs Test:\n<div align=center><img src=\"https://i.ibb.co/HPcfq6s/results-53-0.png\" alt=\"results-53-0\" border=\"0\" width=400></div>\n\n### Whales Vs Dolphin:\n<div align=center><img src=\"https://i.ibb.co/8BrhYPz/results-57-0.png\" alt=\"results-57-0\" border=\"0\" width=400></div>\n\n### Whales Species:\n<div align=center><img src=\"https://i.ibb.co/4j1VQYZ/results-61-0.png\" alt=\"results-61-0\" border=\"0\" width=400></div>\n\n### Dolphin Species:\n<div align=center><img src=\"https://i.ibb.co/Z2sPy5w/results-63-0.png\" alt=\"results-63-0\" border=\"0\" width=400></div>\n\n### Random **Train/Test**:\n<img src=\"https://i.ibb.co/dckr4Hm/trainvtest.png\" alt=\"trainvtest\" border=\"0\">\n\n### Random **Whale/Dolphin**:\n<img src=\"https://i.ibb.co/2sH24Xh/wvsd.png\" alt=\"wvsd\" border=\"0\">\n\n### UMAP/PCA/TSNE using **WandB**\nWe can also plot embeddings using **wandb**. Here's some cool plots using **wandb**,\n<img src=\"https://i.ibb.co/W0gYY0P/w-b01.png\" alt=\"w-b01\" border=\"0\"></a>\n<img src=\"https://i.ibb.co/G5SnMMv/w-b02.png\" alt=\"w-b02\" border=\"0\"></a>\n<img src=\"https://i.ibb.co/1MxnZqX/w-b04.png\" alt=\"w-b04\" border=\"0\"></a>",
      "votes": null
    },
    {
      "id": "1676395",
      "postDate": "02/05/2022 00:14:56",
      "content": "<p>Great idea to use T-SNE. How do you interpret these plots? I'm having a hard time picking up on patterns.</p>",
      "rawMarkdown": "Great idea to use T-SNE. How do you interpret these plots? I'm having a hard time picking up on patterns.",
      "votes": null
    },
    {
      "id": "1677432",
      "postDate": "02/05/2022 18:02:43",
      "content": "<p>As you may already know, </p>\n<pre><code>T-SNE captures structure in the sense that neighboring points in the input space will tend to be neighbors in the low dimensional space. Hence, similar images will stay close and dissimilar images will stay far.\n</code></pre>\n<p>Consider the <strong>Whale/Dolphin</strong> plot. Here background is <strong>Whale</strong>(red) and foreground is <strong>Dolphin</strong>(green). If we can see only red that means it's only <strong>Whale</strong>. If we can see <strong>green</strong> it could be either <strong>Dolphin</strong>(foreground)  or <strong>Whale + Dolphin</strong> (background + foreground). If you look closely at this plot, you would find that there are some regions where we can only see <strong>whales</strong> (background -&gt; <strong>red</strong>) which means no <strong>dolphins</strong> (color: <strong>green</strong>) are present having similar features.  There are some small regions with only the color <strong>green</strong> where you might think it could be <strong>Whales + Dolphin</strong> or <strong>Dolphin</strong> but if you revert the background with foreground you can confirm that it is only <strong>Dolphin</strong>.</p>\n<p>But if you look at the <strong>Train/Test</strong> plot you won't find such a region for <strong>test data</strong> which means for almost every <strong>test</strong> sample we have a similar <strong>train</strong> sample. </p>",
      "rawMarkdown": "As you may already know, \n```\nT-SNE captures structure in the sense that neighboring points in the input space will tend to be neighbors in the low dimensional space. Hence, similar images will stay close and dissimilar images will stay far.\n```\nConsider the **Whale/Dolphin** plot. Here background is **Whale**(red) and foreground is **Dolphin**(green). If we can see only red that means it's only **Whale**. If we can see **green** it could be either **Dolphin**(foreground)  or **Whale + Dolphin** (background + foreground). If you look closely at this plot, you would find that there are some regions where we can only see **whales** (background -> **red**) which means no **dolphins** (color: **green**) are present having similar features.  There are some small regions with only the color **green** where you might think it could be **Whales + Dolphin** or **Dolphin** but if you revert the background with foreground you can confirm that it is only **Dolphin**.\n\nBut if you look at the **Train/Test** plot you won't find such a region for **test data** which means for almost every **test** sample we have a similar **train** sample.",
      "votes": null
    },
    {
      "id": "1677738",
      "postDate": "02/06/2022 00:14:36",
      "content": "<p>One quick observation from a biologist: the whale/dolphin split here doesn't map to any meaningful biological (evolutionary or ecological) categories. Baleen whales (e.g., humpback, gray, or blue) and toothed whales (e.g., pilot whale, spinner dolphin, or spotted dolphin) would be a more meaningful biological distinction. That said, I'm not sure that this distinction would affect the look of your charts. </p>",
      "rawMarkdown": "One quick observation from a biologist: the whale/dolphin split here doesn't map to any meaningful biological (evolutionary or ecological) categories. Baleen whales (e.g., humpback, gray, or blue) and toothed whales (e.g., pilot whale, spinner dolphin, or spotted dolphin) would be a more meaningful biological distinction. That said, I'm not sure that this distinction would affect the look of your charts.",
      "votes": null
    },
    {
      "id": "1677810",
      "postDate": "02/06/2022 02:52:16",
      "content": "<p>I wonder if that's the reason why <strong>whale</strong> and <strong>dolphin</strong> data distribution look similar…</p>",
      "rawMarkdown": "I wonder if that's the reason why **whale** and **dolphin** data distribution look similar...",
      "votes": null
    },
    {
      "id": "1678909",
      "postDate": "02/06/2022 21:01:23",
      "content": "<p>Great visualization! Upvoted <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> </p>",
      "rawMarkdown": "Great visualization! Upvoted @awsaf49",
      "votes": null
    },
    {
      "id": "1678949",
      "postDate": "02/06/2022 21:37:12",
      "content": "<p>I wouldn't read too much into it. Other than the small regions, both whales and dolphins are distributed throughout the 2-d space. Below is a T-SNE plot of the MNIST handwritten digits showing clear separation of groups. <a href=\"https://distill.pub/2016/misread-tsne/\" target=\"_blank\">How to Use t-SNE Effectively</a> </p>\n<p><a href=\"https://projector.tensorflow.org/\" target=\"_blank\">Tensorflow Embedding Projector</a><br>\n<img src=\"https://i.imgur.com/KbBswle.png\" alt=\"mnist\"></p>",
      "rawMarkdown": "I wouldn't read too much into it. Other than the small regions, both whales and dolphins are distributed throughout the 2-d space. Below is a T-SNE plot of the MNIST handwritten digits showing clear separation of groups. [How to Use t-SNE Effectively](https://distill.pub/2016/misread-tsne/) \n\n[Tensorflow Embedding Projector](https://projector.tensorflow.org/)\n![mnist](https://i.imgur.com/KbBswle.png)",
      "votes": null
    },
    {
      "id": "1679171",
      "postDate": "02/07/2022 03:41:45",
      "content": "<pre><code>Other than the small regions, both whales and dolphins are distributed throughout the 2-d space\n</code></pre>\n<p>Yes, you are right, but in <strong>Train/Test</strong> there are no such <strong>small regions</strong> hence they have similar features …</p>",
      "rawMarkdown": "```\nOther than the small regions, both whales and dolphins are distributed throughout the 2-d space\n```\nYes, you are right, but in **Train/Test** there are no such **small regions** hence they have similar features ...",
      "votes": null
    },
    {
      "id": "1682883",
      "postDate": "02/09/2022 12:42:54",
      "content": "<p>This is great im also hoping we can use NLP based algorithms to try and translate Dolphin Languages as they are creatures with high intellect amongst many in the Ocean.</p>",
      "rawMarkdown": "This is great im also hoping we can use NLP based algorithms to try and translate Dolphin Languages as they are creatures with high intellect amongst many in the Ocean.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1676395,
      "author_name": "jpmiller",
      "author_url": "",
      "post_date": "02/05/2022 00:14:56",
      "content": "<p>Great idea to use T-SNE. How do you interpret these plots? I'm having a hard time picking up on patterns.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1677432,
          "author_name": "awsaf49",
          "author_url": "",
          "post_date": "02/05/2022 18:02:43",
          "content": "<p>As you may already know, </p>\n<pre><code>T-SNE captures structure in the sense that neighboring points in the input space will tend to be neighbors in the low dimensional space. Hence, similar images will stay close and dissimilar images will stay far.\n</code></pre>\n<p>Consider the <strong>Whale/Dolphin</strong> plot. Here background is <strong>Whale</strong>(red) and foreground is <strong>Dolphin</strong>(green). If we can see only red that means it's only <strong>Whale</strong>. If we can see <strong>green</strong> it could be either <strong>Dolphin</strong>(foreground)  or <strong>Whale + Dolphin</strong> (background + foreground). If you look closely at this plot, you would find that there are some regions where we can only see <strong>whales</strong> (background -&gt; <strong>red</strong>) which means no <strong>dolphins</strong> (color: <strong>green</strong>) are present having similar features.  There are some small regions with only the color <strong>green</strong> where you might think it could be <strong>Whales + Dolphin</strong> or <strong>Dolphin</strong> but if you revert the background with foreground you can confirm that it is only <strong>Dolphin</strong>.</p>\n<p>But if you look at the <strong>Train/Test</strong> plot you won't find such a region for <strong>test data</strong> which means for almost every <strong>test</strong> sample we have a similar <strong>train</strong> sample. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1678949,
          "author_name": "jpmiller",
          "author_url": "",
          "post_date": "02/06/2022 21:37:12",
          "content": "<p>I wouldn't read too much into it. Other than the small regions, both whales and dolphins are distributed throughout the 2-d space. Below is a T-SNE plot of the MNIST handwritten digits showing clear separation of groups. <a href=\"https://distill.pub/2016/misread-tsne/\" target=\"_blank\">How to Use t-SNE Effectively</a> </p>\n<p><a href=\"https://projector.tensorflow.org/\" target=\"_blank\">Tensorflow Embedding Projector</a><br>\n<img src=\"https://i.imgur.com/KbBswle.png\" alt=\"mnist\"></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1679171,
          "author_name": "awsaf49",
          "author_url": "",
          "post_date": "02/07/2022 03:41:45",
          "content": "<pre><code>Other than the small regions, both whales and dolphins are distributed throughout the 2-d space\n</code></pre>\n<p>Yes, you are right, but in <strong>Train/Test</strong> there are no such <strong>small regions</strong> hence they have similar features …</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1677738,
      "author_name": "philtpatton",
      "author_url": "",
      "post_date": "02/06/2022 00:14:36",
      "content": "<p>One quick observation from a biologist: the whale/dolphin split here doesn't map to any meaningful biological (evolutionary or ecological) categories. Baleen whales (e.g., humpback, gray, or blue) and toothed whales (e.g., pilot whale, spinner dolphin, or spotted dolphin) would be a more meaningful biological distinction. That said, I'm not sure that this distinction would affect the look of your charts. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1677810,
          "author_name": "awsaf49",
          "author_url": "",
          "post_date": "02/06/2022 02:52:16",
          "content": "<p>I wonder if that's the reason why <strong>whale</strong> and <strong>dolphin</strong> data distribution look similar…</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1678909,
      "author_name": "nebipeker",
      "author_url": "",
      "post_date": "02/06/2022 21:01:23",
      "content": "<p>Great visualization! Upvoted <a href=\"https://www.kaggle.com/awsaf49\" target=\"_blank\">@awsaf49</a> </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1682883,
      "author_name": "muhammadammarjamshed",
      "author_url": "",
      "post_date": "02/09/2022 12:42:54",
      "content": "<p>This is great im also hoping we can use NLP based algorithms to try and translate Dolphin Languages as they are creatures with high intellect amongst many in the Ocean.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1673977": "One of the key challenges of this competition is that we've to identify `new_indiviual` even though they don't appear on the **train** data. My initial thought was that `new_individual` may look very different as they don't appear on the **train** data. But **image embeddings** tell a different story. I've published a notebook to demonstrate this analysis using **T-SNE**.\n\n## Notebook Link:\n* [Happywhale: Data Distribution 🐋🐬](https://www.kaggle.com/awsaf49/happywhale-data-distribution)\n\n## Data Distribution:\nTo Plot **image embeddings** I've used using both **WandB** and **cuML**. Both of them are great libraries.   Here are some of the visualizations,\n\n### Train Vs Test:\n<div align=center><img src=\"https://i.ibb.co/HPcfq6s/results-53-0.png\" alt=\"results-53-0\" border=\"0\" width=400></div>\n\n### Whales Vs Dolphin:\n<div align=center><img src=\"https://i.ibb.co/8BrhYPz/results-57-0.png\" alt=\"results-57-0\" border=\"0\" width=400></div>\n\n### Whales Species:\n<div align=center><img src=\"https://i.ibb.co/4j1VQYZ/results-61-0.png\" alt=\"results-61-0\" border=\"0\" width=400></div>\n\n### Dolphin Species:\n<div align=center><img src=\"https://i.ibb.co/Z2sPy5w/results-63-0.png\" alt=\"results-63-0\" border=\"0\" width=400></div>\n\n### Random **Train/Test**:\n<img src=\"https://i.ibb.co/dckr4Hm/trainvtest.png\" alt=\"trainvtest\" border=\"0\">\n\n### Random **Whale/Dolphin**:\n<img src=\"https://i.ibb.co/2sH24Xh/wvsd.png\" alt=\"wvsd\" border=\"0\">\n\n### UMAP/PCA/TSNE using **WandB**\nWe can also plot embeddings using **wandb**. Here's some cool plots using **wandb**,\n<img src=\"https://i.ibb.co/W0gYY0P/w-b01.png\" alt=\"w-b01\" border=\"0\"></a>\n<img src=\"https://i.ibb.co/G5SnMMv/w-b02.png\" alt=\"w-b02\" border=\"0\"></a>\n<img src=\"https://i.ibb.co/1MxnZqX/w-b04.png\" alt=\"w-b04\" border=\"0\"></a>",
    "1676395": "Great idea to use T-SNE. How do you interpret these plots? I'm having a hard time picking up on patterns.",
    "1677432": "As you may already know, \n```\nT-SNE captures structure in the sense that neighboring points in the input space will tend to be neighbors in the low dimensional space. Hence, similar images will stay close and dissimilar images will stay far.\n```\nConsider the **Whale/Dolphin** plot. Here background is **Whale**(red) and foreground is **Dolphin**(green). If we can see only red that means it's only **Whale**. If we can see **green** it could be either **Dolphin**(foreground)  or **Whale + Dolphin** (background + foreground). If you look closely at this plot, you would find that there are some regions where we can only see **whales** (background -> **red**) which means no **dolphins** (color: **green**) are present having similar features.  There are some small regions with only the color **green** where you might think it could be **Whales + Dolphin** or **Dolphin** but if you revert the background with foreground you can confirm that it is only **Dolphin**.\n\nBut if you look at the **Train/Test** plot you won't find such a region for **test data** which means for almost every **test** sample we have a similar **train** sample.",
    "1677738": "One quick observation from a biologist: the whale/dolphin split here doesn't map to any meaningful biological (evolutionary or ecological) categories. Baleen whales (e.g., humpback, gray, or blue) and toothed whales (e.g., pilot whale, spinner dolphin, or spotted dolphin) would be a more meaningful biological distinction. That said, I'm not sure that this distinction would affect the look of your charts.",
    "1677810": "I wonder if that's the reason why **whale** and **dolphin** data distribution look similar...",
    "1678909": "Great visualization! Upvoted @awsaf49",
    "1678949": "I wouldn't read too much into it. Other than the small regions, both whales and dolphins are distributed throughout the 2-d space. Below is a T-SNE plot of the MNIST handwritten digits showing clear separation of groups. [How to Use t-SNE Effectively](https://distill.pub/2016/misread-tsne/) \n\n[Tensorflow Embedding Projector](https://projector.tensorflow.org/)\n![mnist](https://i.imgur.com/KbBswle.png)",
    "1679171": "```\nOther than the small regions, both whales and dolphins are distributed throughout the 2-d space\n```\nYes, you are right, but in **Train/Test** there are no such **small regions** hence they have similar features ...",
    "1682883": "This is great im also hoping we can use NLP based algorithms to try and translate Dolphin Languages as they are creatures with high intellect amongst many in the Ocean."
  },
  "source": "meta"
}