{
  "id": 121584,
  "title": "4th place solution",
  "content": "<p>Logistic regression  with the following encodings of the columns:</p>\n\n<ol>\n<li>binary: linear transform to [-1, 1]</li>\n<li>nominal: collapse unique values from train/test to single value, one hot encode to sparse matrix (both this ideas saw in public kernels)</li>\n<li>ordinal: transform to [-1, 1] using sklearn.preprocessing.MinMaxScaler((-1, 1))</li>\n<li>cyclical: one-hot encode. regression coefficients for day looked symmetrical, so tried to one hot encode abs(day-4) instead of day. </li>\n</ol>\n\n<p>The optimizer was sklearn.linear_model.LogisticRegression(solver='lbfgs', C=.121)</p>\n\n<p>Most of the time went into trying different encodings for day and month, hoping to find cyclical nature of this columns.</p>",
  "comments": [
    {
      "id": 696334,
      "author_name": "Shruti_Iyyer",
      "author_url": "",
      "post_date": "2019-12-16T13:44:44.060000",
      "content": "<p>Thanks a lot for this.\nSo \"binary: linear transform to [-1, 1]\" means putting -1 in place of 0 and 1 for 1?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 696889,
          "author_name": "Ilya Plemian",
          "author_url": "",
          "post_date": "2019-12-17T07:33:57.733000",
          "content": "<p>right</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 696943,
          "author_name": "Shruti_Iyyer",
          "author_url": "",
          "post_date": "2019-12-17T09:19:31.067000",
          "content": "<p>Thanks!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 939184,
      "author_name": "mutexai",
      "author_url": "",
      "post_date": "2020-07-22T04:37:27.133000",
      "content": "<p>hello!! excellent work! may I ask why you did \"binary: linear transform to [-1, 1]\" ??\ndoes it have good effect??</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 708347,
      "author_name": "Ahmed Mohamed",
      "author_url": "",
      "post_date": "2020-01-02T07:58:34.747000",
      "content": "<p>Amazing Work , Excellent  Topic upvote it <a href=\"/plemian\">@plemian</a> </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 698102,
      "author_name": "aldparis",
      "author_url": "",
      "post_date": "2019-12-18T20:02:41.663000",
      "content": "<p>Thank you for sharing and congratulations !</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 695040,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-12-14T13:28:27.320000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 695747,
      "author_name": "AlbertoDS",
      "author_url": "",
      "post_date": "2019-12-15T14:12:55.647000",
      "content": "<p>Easy and nice. Thank you <a href=\"/plemian\">@plemian</a> </p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 698393,
      "author_name": "Rao Babar Ali",
      "author_url": "",
      "post_date": "2019-12-19T07:03:59.403000",
      "content": "<p>Thanks a lot for this. </p>",
      "votes": 0,
      "replies": []
    }
  ],
  "comment_count": 9,
  "messages": [
    {
      "id": 694875,
      "postDate": "2019-12-14T08:43:19.730Z",
      "content": "<p>Logistic regression  with the following encodings of the columns:</p>\n\n<ol>\n<li>binary: linear transform to [-1, 1]</li>\n<li>nominal: collapse unique values from train/test to single value, one hot encode to sparse matrix (both this ideas saw in public kernels)</li>\n<li>ordinal: transform to [-1, 1] using sklearn.preprocessing.MinMaxScaler((-1, 1))</li>\n<li>cyclical: one-hot encode. regression coefficients for day looked symmetrical, so tried to one hot encode abs(day-4) instead of day. </li>\n</ol>\n\n<p>The optimizer was sklearn.linear_model.LogisticRegression(solver='lbfgs', C=.121)</p>\n\n<p>Most of the time went into trying different encodings for day and month, hoping to find cyclical nature of this columns.</p>",
      "rawMarkdown": "Logistic regression  with the following encodings of the columns:\n\n1. binary: linear transform to [-1, 1]\n2. nominal: collapse unique values from train/test to single value, one hot encode to sparse matrix (both this ideas saw in public kernels)\n3. ordinal: transform to [-1, 1] using sklearn.preprocessing.MinMaxScaler((-1, 1))\n4. cyclical: one-hot encode. regression coefficients for day looked symmetrical, so tried to one hot encode abs(day-4) instead of day. \n\nThe optimizer was sklearn.linear_model.LogisticRegression(solver='lbfgs', C=.121)\n\nMost of the time went into trying different encodings for day and month, hoping to find cyclical nature of this columns.",
      "votes": 11
    },
    {
      "id": 696334,
      "postDate": "2019-12-16T13:44:44.060Z",
      "content": "<p>Thanks a lot for this.\nSo \"binary: linear transform to [-1, 1]\" means putting -1 in place of 0 and 1 for 1?</p>",
      "rawMarkdown": "Thanks a lot for this.\nSo \"binary: linear transform to [-1, 1]\" means putting -1 in place of 0 and 1 for 1?",
      "votes": 1,
      "replies": [
        {
          "id": 696889,
          "postDate": "2019-12-17T07:33:57.733Z",
          "content": "<p>right</p>",
          "rawMarkdown": "right"
        },
        {
          "id": 696943,
          "postDate": "2019-12-17T09:19:31.067Z",
          "content": "<p>Thanks!</p>",
          "rawMarkdown": "Thanks!"
        }
      ]
    },
    {
      "id": 939184,
      "postDate": "2020-07-22T04:37:27.133Z",
      "content": "<p>hello!! excellent work! may I ask why you did \"binary: linear transform to [-1, 1]\" ??\ndoes it have good effect??</p>",
      "rawMarkdown": "hello!! excellent work! may I ask why you did \"binary: linear transform to [-1, 1]\" ??\ndoes it have good effect??"
    },
    {
      "id": 708347,
      "postDate": "2020-01-02T07:58:34.747Z",
      "content": "<p>Amazing Work , Excellent  Topic upvote it <a href=\"/plemian\">@plemian</a> </p>",
      "rawMarkdown": "Amazing Work , Excellent  Topic upvote it @plemian \n"
    },
    {
      "id": 698102,
      "postDate": "2019-12-18T20:02:41.663Z",
      "content": "<p>Thank you for sharing and congratulations !</p>",
      "rawMarkdown": "Thank you for sharing and congratulations !"
    },
    {
      "id": 695040,
      "postDate": "2019-12-14T13:28:27.320Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 695747,
      "postDate": "2019-12-15T14:12:55.647Z",
      "content": "<p>Easy and nice. Thank you <a href=\"/plemian\">@plemian</a> </p>",
      "rawMarkdown": "Easy and nice. Thank you @plemian ",
      "votes": 2
    },
    {
      "id": 698393,
      "postDate": "2019-12-19T07:03:59.403Z",
      "content": "<p>Thanks a lot for this. </p>",
      "rawMarkdown": "Thanks a lot for this. "
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T17:33:20Z",
  "competition_id": 14999,
  "competition_slug": "cat-in-the-dat",
  "team_id": 3575487,
  "solution_url": "/competitions/cat-in-the-dat/writeups/ilya-plemian-4th-place-solution"
}