{
  "id": 384120,
  "title": "6th place solution (single model LB 0.603)",
  "url": "/competitions/otto-recommender-system/discussion/384120",
  "author_name": "THLUO",
  "post_date": "2023-02-06T17:33:59.682000",
  "votes": 44,
  "comment_count": 10,
  "views": 0,
  "content": "<p>Thanks to kaggle and OTTO for the great game. This is my first solo gold medal and I'm very excited about it.<br>\nThis is my overall model framework.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F7164310586891a03ca0ff7a8a86b6422%2Fpipline_20230206230744.png?generation=1675696578724236&amp;alt=media\" alt=\"\"></p>\n<h1>Retrieval</h1>\n<p>I've included three recalls</p>\n<ul>\n<li>top 150 Co-visitation Matrix by CHRIS DEOTTE <a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/cdeotte/candidate-rerank-model-lb-0-575</a></li>\n<li>top 100 click 2 click bidirection i2i similarity with pos, time, session, aid weight </li>\n<li>top 100 click 2 cart bidirection i2i similarity with pos, time, session, aid weight <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2Ffffea55d055186ec905fe62678dd819e%2Fi2i_sim_20230207001335.png?generation=1675700054785631&amp;alt=media\" alt=\"\"></li>\n</ul>\n<h1>Features</h1>\n<ul>\n<li>session feats: </li>\n</ul>\n<ol>\n<li>the counts and frequency of user clicks/orders/carts</li>\n<li>user last clicks/orders/carts aid and hour</li>\n<li>user last behavior type</li>\n</ol>\n<ul>\n<li>aid feats:</li>\n</ul>\n<ol>\n<li>aid clicks/orders/carts counts</li>\n<li>aid clicks/orders/carts ratio</li>\n<li>aid clicks/orders/carts time</li>\n<li>aid behavior mean type</li>\n</ol>\n<ul>\n<li>session aid feats:</li>\n</ul>\n<ol>\n<li>user clicks/orders/carts aid counts</li>\n<li>user clicks/orders/carts aid time</li>\n<li>user behavior aid mean type and last behavior type</li>\n<li>abs(hots/time of user click/cart/order the aid  - aid click/cart/order hots/time)</li>\n</ol>\n<ul>\n<li>sim feats:</li>\n</ul>\n<ol>\n<li>Co-visitation Matrix rank</li>\n<li>clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i sim with pos, time weight.</li>\n<li>clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i mean/max/min/std/last sim </li>\n<li>clicks/carts/orders to clicks/carts/orders aid pair sim with pos, time weight.</li>\n<li>clicks/carts/orders to clicks/carts/orders aid pair mean/max/min/std/last sim </li>\n<li>w2v embedding sim </li>\n</ol>\n<h1>Train And Validation</h1>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F73e54cb63b4c969f0091a271e140b481%2Ftrain_valid_20230206232247.png?generation=1675697003585741&amp;alt=media\" alt=\"\"><br>\nIn the verification phase, I used Radek’s CV strategy.<br>\nFor online prediction, train_v1 + train_v2 + valid was used as training data.</p>\n<h1>Model</h1>\n<p>I used lightgbm binary classifier, learning rate: 0.02, 5500 rounds</p>\n<h1>Local CV And LB Score</h1>\n<p>best single model local cv parts:<br>\n1.orders recall@20 is 0.6715<br>\n1.carts recall@20 is 0.4433<br>\n1.clicks recall@20 is 0.5561<br>\nMy local cv is 0.6715 * 0.6 + 0.4433 * 0.3 + 0.5561 * 0.1 = 0.5915<br>\nLB is 0.60335</p>\n<h1>Enemble</h1>\n<p>I didn't run the second model，i am using the previously submitted version of the model for a blend of probability. this is give me the final score 0.60341</p>",
  "messages": [
    {
      "id": 2132260,
      "postDate": "2023-02-06T17:33:59.683Z",
      "content": "<p>Thanks to kaggle and OTTO for the great game. This is my first solo gold medal and I'm very excited about it.<br>\nThis is my overall model framework.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F7164310586891a03ca0ff7a8a86b6422%2Fpipline_20230206230744.png?generation=1675696578724236&amp;alt=media\" alt=\"\"></p>\n<h1>Retrieval</h1>\n<p>I've included three recalls</p>\n<ul>\n<li>top 150 Co-visitation Matrix by CHRIS DEOTTE <a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/cdeotte/candidate-rerank-model-lb-0-575</a></li>\n<li>top 100 click 2 click bidirection i2i similarity with pos, time, session, aid weight </li>\n<li>top 100 click 2 cart bidirection i2i similarity with pos, time, session, aid weight <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2Ffffea55d055186ec905fe62678dd819e%2Fi2i_sim_20230207001335.png?generation=1675700054785631&amp;alt=media\" alt=\"\"></li>\n</ul>\n<h1>Features</h1>\n<ul>\n<li>session feats: </li>\n</ul>\n<ol>\n<li>the counts and frequency of user clicks/orders/carts</li>\n<li>user last clicks/orders/carts aid and hour</li>\n<li>user last behavior type</li>\n</ol>\n<ul>\n<li>aid feats:</li>\n</ul>\n<ol>\n<li>aid clicks/orders/carts counts</li>\n<li>aid clicks/orders/carts ratio</li>\n<li>aid clicks/orders/carts time</li>\n<li>aid behavior mean type</li>\n</ol>\n<ul>\n<li>session aid feats:</li>\n</ul>\n<ol>\n<li>user clicks/orders/carts aid counts</li>\n<li>user clicks/orders/carts aid time</li>\n<li>user behavior aid mean type and last behavior type</li>\n<li>abs(hots/time of user click/cart/order the aid  - aid click/cart/order hots/time)</li>\n</ol>\n<ul>\n<li>sim feats:</li>\n</ul>\n<ol>\n<li>Co-visitation Matrix rank</li>\n<li>clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i sim with pos, time weight.</li>\n<li>clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i mean/max/min/std/last sim </li>\n<li>clicks/carts/orders to clicks/carts/orders aid pair sim with pos, time weight.</li>\n<li>clicks/carts/orders to clicks/carts/orders aid pair mean/max/min/std/last sim </li>\n<li>w2v embedding sim </li>\n</ol>\n<h1>Train And Validation</h1>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F73e54cb63b4c969f0091a271e140b481%2Ftrain_valid_20230206232247.png?generation=1675697003585741&amp;alt=media\" alt=\"\"><br>\nIn the verification phase, I used Radek’s CV strategy.<br>\nFor online prediction, train_v1 + train_v2 + valid was used as training data.</p>\n<h1>Model</h1>\n<p>I used lightgbm binary classifier, learning rate: 0.02, 5500 rounds</p>\n<h1>Local CV And LB Score</h1>\n<p>best single model local cv parts:<br>\n1.orders recall@20 is 0.6715<br>\n1.carts recall@20 is 0.4433<br>\n1.clicks recall@20 is 0.5561<br>\nMy local cv is 0.6715 * 0.6 + 0.4433 * 0.3 + 0.5561 * 0.1 = 0.5915<br>\nLB is 0.60335</p>\n<h1>Enemble</h1>\n<p>I didn't run the second model，i am using the previously submitted version of the model for a blend of probability. this is give me the final score 0.60341</p>",
      "rawMarkdown": "Thanks to kaggle and OTTO for the great game. This is my first solo gold medal and I'm very excited about it.\nThis is my overall model framework.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F7164310586891a03ca0ff7a8a86b6422%2Fpipline_20230206230744.png?generation=1675696578724236&alt=media)\n\n# Retrieval\nI've included three recalls\n- top 150 Co-visitation Matrix by CHRIS DEOTTE [https://www.kaggle.com/code/cdeotte/candidate-rerank-model-lb-0-575](url)\n- top 100 click 2 click bidirection i2i similarity with pos, time, session, aid weight \n- top 100 click 2 cart bidirection i2i similarity with pos, time, session, aid weight \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2Ffffea55d055186ec905fe62678dd819e%2Fi2i_sim_20230207001335.png?generation=1675700054785631&alt=media)\n\n# Features\n- session feats: \n1. the counts and frequency of user clicks/orders/carts\n1. user last clicks/orders/carts aid and hour\n1. user last behavior type\n- aid feats:\n1. aid clicks/orders/carts counts\n1. aid clicks/orders/carts ratio\n1. aid clicks/orders/carts time\n1. aid behavior mean type\n- session aid feats:\n1. user clicks/orders/carts aid counts\n1. user clicks/orders/carts aid time\n1. user behavior aid mean type and last behavior type\n1. abs(hots/time of user click/cart/order the aid  - aid click/cart/order hots/time)\n- sim feats:\n1. Co-visitation Matrix rank\n1. clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i sim with pos, time weight.\n1. clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i mean/max/min/std/last sim \n1. clicks/carts/orders to clicks/carts/orders aid pair sim with pos, time weight.\n1. clicks/carts/orders to clicks/carts/orders aid pair mean/max/min/std/last sim \n1. w2v embedding sim \n\n# Train And Validation \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F73e54cb63b4c969f0091a271e140b481%2Ftrain_valid_20230206232247.png?generation=1675697003585741&alt=media)\nIn the verification phase, I used Radek’s CV strategy.\nFor online prediction, train_v1 + train_v2 + valid was used as training data.\n\n# Model\nI used lightgbm binary classifier, learning rate: 0.02, 5500 rounds\n\n# Local CV And LB Score\nbest single model local cv parts:\n1.orders recall@20 is 0.6715\n1.carts recall@20 is 0.4433\n1.clicks recall@20 is 0.5561\nMy local cv is 0.6715 * 0.6 + 0.4433 * 0.3 + 0.5561 * 0.1 = 0.5915\nLB is 0.60335\n\n# Enemble\nI didn't run the second model，i am using the previously submitted version of the model for a blend of probability. this is give me the final score 0.60341",
      "votes": 44
    },
    {
      "id": 2159987,
      "postDate": "2023-02-26T08:50:08.783Z",
      "content": "<p>excuse me, may i ask what is the score that  only i2i recall, not rank and not 0.575 can you get</p>",
      "rawMarkdown": "excuse me, may i ask what is the score that  only i2i recall, not rank and not 0.575 can you get"
    },
    {
      "id": 2156020,
      "postDate": "2023-02-23T03:51:46.980Z",
      "content": "<p>Thank you so much for this!<br>\nIf it doesn't bother you, may I ask what is position order of an item, and <code>is_sort</code> value, which was mentioned in the i2i similarity?</p>",
      "rawMarkdown": "Thank you so much for this!\nIf it doesn't bother you, may I ask what is position order of an item, and `is_sort` value, which was mentioned in the i2i similarity?"
    },
    {
      "id": 2140410,
      "postDate": "2023-02-11T18:02:16.643Z",
      "content": "<p>Thank you so much for this. Really helpful </p>",
      "rawMarkdown": "Thank you so much for this. Really helpful "
    },
    {
      "id": 2134462,
      "postDate": "2023-02-08T02:08:15.937Z",
      "content": "<p><a href=\"https://www.kaggle.com/ilovearsenal\" target=\"_blank\">@ilovearsenal</a> The leaderboard is finalized and you are 7th place now. Do you modify the title of thread ? We are 8th place now.</p>",
      "rawMarkdown": "@ilovearsenal The leaderboard is finalized and you are 7th place now. Do you modify the title of thread ? We are 8th place now.",
      "replies": [
        {
          "id": 2134643,
          "postDate": "2023-02-08T06:52:16.787Z",
          "content": "<p>ok,i have modified the title😄.</p>",
          "rawMarkdown": "ok,i have modified the title😄.",
          "votes": 1
        }
      ]
    },
    {
      "id": 2132658,
      "postDate": "2023-02-07T01:00:12.723Z",
      "content": "<p>Congrats and thanks for sharing!! <br>\nI also tried i2i similarity but ultimately gave up due to memory issues. I wonder how did you manage memory when calculating i2i similarity or you just had better hardware specs?</p>",
      "rawMarkdown": "Congrats and thanks for sharing!! \nI also tried i2i similarity but ultimately gave up due to memory issues. I wonder how did you manage memory when calculating i2i similarity or you just had better hardware specs?",
      "replies": [
        {
          "id": 2132670,
          "postDate": "2023-02-07T01:25:44.703Z",
          "content": "<p>Thank you for your question, I used a machine with 128G RAM and 16 core cpu.<br>\nI used dict to store similarity data.<br>\nThere are two limitations to calculating i2i similarity.<br>\n1.Collinear relationships are calculated only for N days.<br>\n2.Collinear relationships are calculated only for position distance &lt;=M.</p>",
          "rawMarkdown": "Thank you for your question, I used a machine with 128G RAM and 16 core cpu.\nI used dict to store similarity data.\nThere are two limitations to calculating i2i similarity.\n1.Collinear relationships are calculated only for N days.\n2.Collinear relationships are calculated only for position distance <=M.",
          "votes": 1
        }
      ]
    },
    {
      "id": 3115008,
      "postDate": "2025-02-04T12:14:53.737Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 3115006,
      "postDate": "2025-02-04T12:14:35.990Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2138123,
      "postDate": "2023-02-10T15:22:24.633Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2159987,
      "author_name": "wcq_glhf",
      "author_url": "",
      "post_date": "2023-02-26T08:50:08.783000",
      "content": "<p>excuse me, may i ask what is the score that  only i2i recall, not rank and not 0.575 can you get</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2156020,
      "author_name": "Ngọc Uyên Nguyễn",
      "author_url": "",
      "post_date": "2023-02-23T03:51:46.980000",
      "content": "<p>Thank you so much for this!<br>\nIf it doesn't bother you, may I ask what is position order of an item, and <code>is_sort</code> value, which was mentioned in the i2i similarity?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2140410,
      "author_name": "Jims Chacko",
      "author_url": "",
      "post_date": "2023-02-11T18:02:16.643000",
      "content": "<p>Thank you so much for this. Really helpful </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2134462,
      "author_name": "toshi_k",
      "author_url": "",
      "post_date": "2023-02-08T02:08:15.937000",
      "content": "<p><a href=\"https://www.kaggle.com/ilovearsenal\" target=\"_blank\">@ilovearsenal</a> The leaderboard is finalized and you are 7th place now. Do you modify the title of thread ? We are 8th place now.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2134643,
          "author_name": "THLUO",
          "author_url": "",
          "post_date": "2023-02-08T06:52:16.787000",
          "content": "<p>ok,i have modified the title😄.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2132658,
      "author_name": "Bibek",
      "author_url": "",
      "post_date": "2023-02-07T01:00:12.723000",
      "content": "<p>Congrats and thanks for sharing!! <br>\nI also tried i2i similarity but ultimately gave up due to memory issues. I wonder how did you manage memory when calculating i2i similarity or you just had better hardware specs?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2132670,
          "author_name": "THLUO",
          "author_url": "",
          "post_date": "2023-02-07T01:25:44.703000",
          "content": "<p>Thank you for your question, I used a machine with 128G RAM and 16 core cpu.<br>\nI used dict to store similarity data.<br>\nThere are two limitations to calculating i2i similarity.<br>\n1.Collinear relationships are calculated only for N days.<br>\n2.Collinear relationships are calculated only for position distance &lt;=M.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 3115008,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-02-04T12:14:53.737000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3115006,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-02-04T12:14:35.990000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2138123,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-02-10T15:22:24.633000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2132260": "Thanks to kaggle and OTTO for the great game. This is my first solo gold medal and I'm very excited about it.\nThis is my overall model framework.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F7164310586891a03ca0ff7a8a86b6422%2Fpipline_20230206230744.png?generation=1675696578724236&alt=media)\n\n# Retrieval\nI've included three recalls\n- top 150 Co-visitation Matrix by CHRIS DEOTTE [https://www.kaggle.com/code/cdeotte/candidate-rerank-model-lb-0-575](url)\n- top 100 click 2 click bidirection i2i similarity with pos, time, session, aid weight \n- top 100 click 2 cart bidirection i2i similarity with pos, time, session, aid weight \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2Ffffea55d055186ec905fe62678dd819e%2Fi2i_sim_20230207001335.png?generation=1675700054785631&alt=media)\n\n# Features\n- session feats: \n1. the counts and frequency of user clicks/orders/carts\n1. user last clicks/orders/carts aid and hour\n1. user last behavior type\n- aid feats:\n1. aid clicks/orders/carts counts\n1. aid clicks/orders/carts ratio\n1. aid clicks/orders/carts time\n1. aid behavior mean type\n- session aid feats:\n1. user clicks/orders/carts aid counts\n1. user clicks/orders/carts aid time\n1. user behavior aid mean type and last behavior type\n1. abs(hots/time of user click/cart/order the aid  - aid click/cart/order hots/time)\n- sim feats:\n1. Co-visitation Matrix rank\n1. clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i sim with pos, time weight.\n1. clicks/carts/orders to clicks/carts/orders 2 clicks/carts/orders i2i/i2i2i mean/max/min/std/last sim \n1. clicks/carts/orders to clicks/carts/orders aid pair sim with pos, time weight.\n1. clicks/carts/orders to clicks/carts/orders aid pair mean/max/min/std/last sim \n1. w2v embedding sim \n\n# Train And Validation \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F921191%2F73e54cb63b4c969f0091a271e140b481%2Ftrain_valid_20230206232247.png?generation=1675697003585741&alt=media)\nIn the verification phase, I used Radek’s CV strategy.\nFor online prediction, train_v1 + train_v2 + valid was used as training data.\n\n# Model\nI used lightgbm binary classifier, learning rate: 0.02, 5500 rounds\n\n# Local CV And LB Score\nbest single model local cv parts:\n1.orders recall@20 is 0.6715\n1.carts recall@20 is 0.4433\n1.clicks recall@20 is 0.5561\nMy local cv is 0.6715 * 0.6 + 0.4433 * 0.3 + 0.5561 * 0.1 = 0.5915\nLB is 0.60335\n\n# Enemble\nI didn't run the second model，i am using the previously submitted version of the model for a blend of probability. this is give me the final score 0.60341",
    "2159987": "excuse me, may i ask what is the score that  only i2i recall, not rank and not 0.575 can you get",
    "2156020": "Thank you so much for this!\nIf it doesn't bother you, may I ask what is position order of an item, and `is_sort` value, which was mentioned in the i2i similarity?",
    "2140410": "Thank you so much for this. Really helpful ",
    "2134462": "@ilovearsenal The leaderboard is finalized and you are 7th place now. Do you modify the title of thread ? We are 8th place now.",
    "2132658": "Congrats and thanks for sharing!! \nI also tried i2i similarity but ultimately gave up due to memory issues. I wonder how did you manage memory when calculating i2i similarity or you just had better hardware specs?",
    "3115008": "",
    "3115006": "",
    "2138123": ""
  }
}