{
  "id": 374994,
  "title": "Can we use  KNN or K means clustering algorithm to generate recommendation?",
  "url": "/competitions/otto-recommender-system/discussion/374994",
  "author_name": "",
  "post_date": "2022-12-29T19:53:06.735970100Z",
  "votes": 3,
  "comment_count": 3,
  "views": 0,
  "content": "<p>using KNN we can detect the nearest \"aid\" values.For the  K-MEANS also we can create clusters .So, instead of using the recommendation methods can't we try using KNN or K-means?</p>",
  "messages": [
    {
      "id": "2080054",
      "postDate": "12/29/2022 19:53:06",
      "content": "<p>using KNN we can detect the nearest \"aid\" values.For the  K-MEANS also we can create clusters .So, instead of using the recommendation methods can't we try using KNN or K-means?</p>",
      "rawMarkdown": "using KNN we can detect the nearest \"aid\" values.For the  K-MEANS also we can create clusters .So, instead of using the recommendation methods can't we try using KNN or K-means?",
      "votes": null
    },
    {
      "id": "2080121",
      "postDate": "12/29/2022 21:38:24",
      "content": "<p>Yes we can. But first we will need to run another algorithm like Matrix Factorization or Item2Vec to transform the items into meaningful embeddings. Then we can apply KNN (actually ANN) and/or K means. This is what the notebooks that use Matrix Factorization and Item2Vec do.</p>",
      "rawMarkdown": "Yes we can. But first we will need to run another algorithm like Matrix Factorization or Item2Vec to transform the items into meaningful embeddings. Then we can apply KNN (actually ANN) and/or K means. This is what the notebooks that use Matrix Factorization and Item2Vec do.",
      "votes": null
    },
    {
      "id": "2080518",
      "postDate": "12/30/2022 08:40:53",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> , for the knowledge, can you share any docs from where i can learn the matrix factorization</p>",
      "rawMarkdown": "Thanks @cdeotte , for the knowledge, can you share any docs from where i can learn the matrix factorization",
      "votes": null
    },
    {
      "id": "2080761",
      "postDate": "12/30/2022 13:11:44",
      "content": "<p>Here are 3 notebooks. The first is an introduction to matrix factorization by Radek. The second is a faster optimized version by CPMP. The third demonstrates some EDA with the matrix factorization. </p>\n<p>The basic idea of matrix factorization is that we input 2 items ids into a NN and the NN predicts 1 if the 2 items are found somewhere in the train data as consecutive clicks or the model predicts 0 if the items do not appear consecutive. Afterward we extract the brain of the NN which is the item embeddings.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/radek1/matrix-factorization-pytorch-merlin-dataloader\" target=\"_blank\">first</a></li>\n<li><a href=\"https://www.kaggle.com/code/cpmpml/matrix-factorization-with-gpu\" target=\"_blank\">second</a></li>\n<li><a href=\"https://www.kaggle.com/code/cdeotte/user-eda-with-rapids-tsne-and-matrix-factorization\" target=\"_blank\">third</a></li>\n</ul>",
      "rawMarkdown": "Here are 3 notebooks. The first is an introduction to matrix factorization by Radek. The second is a faster optimized version by CPMP. The third demonstrates some EDA with the matrix factorization. \n\nThe basic idea of matrix factorization is that we input 2 items ids into a NN and the NN predicts 1 if the 2 items are found somewhere in the train data as consecutive clicks or the model predicts 0 if the items do not appear consecutive. Afterward we extract the brain of the NN which is the item embeddings.\n\n* [first][1]\n* [second][2]\n* [third][3]\n\n[1]: https://www.kaggle.com/code/radek1/matrix-factorization-pytorch-merlin-dataloader\n[2]: https://www.kaggle.com/code/cpmpml/matrix-factorization-with-gpu\n[3]: https://www.kaggle.com/code/cdeotte/user-eda-with-rapids-tsne-and-matrix-factorization",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2080121,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "12/29/2022 21:38:24",
      "content": "<p>Yes we can. But first we will need to run another algorithm like Matrix Factorization or Item2Vec to transform the items into meaningful embeddings. Then we can apply KNN (actually ANN) and/or K means. This is what the notebooks that use Matrix Factorization and Item2Vec do.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2080518,
          "author_name": "biswajit01",
          "author_url": "",
          "post_date": "12/30/2022 08:40:53",
          "content": "<p>Thanks <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> , for the knowledge, can you share any docs from where i can learn the matrix factorization</p>",
          "votes": null,
          "replies": [
            {
              "id": 2080761,
              "author_name": "cdeotte",
              "author_url": "",
              "post_date": "12/30/2022 13:11:44",
              "content": "<p>Here are 3 notebooks. The first is an introduction to matrix factorization by Radek. The second is a faster optimized version by CPMP. The third demonstrates some EDA with the matrix factorization. </p>\n<p>The basic idea of matrix factorization is that we input 2 items ids into a NN and the NN predicts 1 if the 2 items are found somewhere in the train data as consecutive clicks or the model predicts 0 if the items do not appear consecutive. Afterward we extract the brain of the NN which is the item embeddings.</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/radek1/matrix-factorization-pytorch-merlin-dataloader\" target=\"_blank\">first</a></li>\n<li><a href=\"https://www.kaggle.com/code/cpmpml/matrix-factorization-with-gpu\" target=\"_blank\">second</a></li>\n<li><a href=\"https://www.kaggle.com/code/cdeotte/user-eda-with-rapids-tsne-and-matrix-factorization\" target=\"_blank\">third</a></li>\n</ul>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2080054": "using KNN we can detect the nearest \"aid\" values.For the  K-MEANS also we can create clusters .So, instead of using the recommendation methods can't we try using KNN or K-means?",
    "2080121": "Yes we can. But first we will need to run another algorithm like Matrix Factorization or Item2Vec to transform the items into meaningful embeddings. Then we can apply KNN (actually ANN) and/or K means. This is what the notebooks that use Matrix Factorization and Item2Vec do.",
    "2080518": "Thanks @cdeotte , for the knowledge, can you share any docs from where i can learn the matrix factorization",
    "2080761": "Here are 3 notebooks. The first is an introduction to matrix factorization by Radek. The second is a faster optimized version by CPMP. The third demonstrates some EDA with the matrix factorization. \n\nThe basic idea of matrix factorization is that we input 2 items ids into a NN and the NN predicts 1 if the 2 items are found somewhere in the train data as consecutive clicks or the model predicts 0 if the items do not appear consecutive. Afterward we extract the brain of the NN which is the item embeddings.\n\n* [first][1]\n* [second][2]\n* [third][3]\n\n[1]: https://www.kaggle.com/code/radek1/matrix-factorization-pytorch-merlin-dataloader\n[2]: https://www.kaggle.com/code/cpmpml/matrix-factorization-with-gpu\n[3]: https://www.kaggle.com/code/cdeotte/user-eda-with-rapids-tsne-and-matrix-factorization"
  },
  "source": "meta"
}