{
  "id": 142077,
  "title": "Bloqued at 0.55%",
  "url": "/competitions/cat-in-the-dat-ii/discussion/142077",
  "author_name": "",
  "post_date": "2020-04-08T20:37:19.189031600Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hi, \nI hope you are good! </p>\n\n<p>I started this kernel to learn a bit more about \"Feature Encoding\", because it seems to me to be the most important in data science (Data in the center you know). </p>\n\n<p>The thing is I'm actually blocked at an \"accuracy\" of ~58%. I started by making my own kernel, and when I realized I can't reach more than 60% of \"accuracy\", I helped myself by reading some kernel in this section. </p>\n\n<p>Now, after changing my code, the problem persists. After reading and reading my code, I don't understand where I missed something. I know that I can optimize my result (Outliers, skewed values, more models, fillna() with better values ...) but my problem is to understand WHERE I made a mistake in my reasoning. </p>\n\n<p>If someone can help me, I would be grateful! \nAbove my kernel : \n<a href=\"https://www.kaggle.com/niscreed/auc-bloqued-at-55\">https://www.kaggle.com/niscreed/auc-bloqued-at-55</a></p>",
  "messages": [
    {
      "id": "801815",
      "postDate": "04/08/2020 20:37:19",
      "content": "<p>Hi, \nI hope you are good! </p>\n\n<p>I started this kernel to learn a bit more about \"Feature Encoding\", because it seems to me to be the most important in data science (Data in the center you know). </p>\n\n<p>The thing is I'm actually blocked at an \"accuracy\" of ~58%. I started by making my own kernel, and when I realized I can't reach more than 60% of \"accuracy\", I helped myself by reading some kernel in this section. </p>\n\n<p>Now, after changing my code, the problem persists. After reading and reading my code, I don't understand where I missed something. I know that I can optimize my result (Outliers, skewed values, more models, fillna() with better values ...) but my problem is to understand WHERE I made a mistake in my reasoning. </p>\n\n<p>If someone can help me, I would be grateful! \nAbove my kernel : \n<a href=\"https://www.kaggle.com/niscreed/auc-bloqued-at-55\">https://www.kaggle.com/niscreed/auc-bloqued-at-55</a></p>",
      "rawMarkdown": "Hi, \nI hope you are good! \n\nI started this kernel to learn a bit more about \"Feature Encoding\", because it seems to me to be the most important in data science (Data in the center you know). \n\nThe thing is I'm actually blocked at an \"accuracy\" of ~58%. I started by making my own kernel, and when I realized I can't reach more than 60% of \"accuracy\", I helped myself by reading some kernel in this section. \n\nNow, after changing my code, the problem persists. After reading and reading my code, I don't understand where I missed something. I know that I can optimize my result (Outliers, skewed values, more models, fillna() with better values ...) but my problem is to understand WHERE I made a mistake in my reasoning. \n\nIf someone can help me, I would be grateful! \nAbove my kernel : \nhttps://www.kaggle.com/niscreed/auc-bloqued-at-55",
      "votes": null
    },
    {
      "id": "801912",
      "postDate": "04/08/2020 23:48:38",
      "content": "<p>Hi, am not an experienced kaggler but just answering as I think I had the same problem as you when I ran my first notebook - is your model set to predict, rather than predict_proba?</p>\n\n<p>Think you need the prediction of probabilities to get the ROC AUC as per the leaderboard</p>\n\n<p>Apologies in advance if this is not the right answer...</p>\n\n<p>p.s. think submission also needs % probability not predicted 0 or 1 list</p>",
      "rawMarkdown": "Hi, am not an experienced kaggler but just answering as I think I had the same problem as you when I ran my first notebook - is your model set to predict, rather than predict_proba?\n\nThink you need the prediction of probabilities to get the ROC AUC as per the leaderboard\n\nApologies in advance if this is not the right answer...\n\np.s. think submission also needs % probability not predicted 0 or 1 list",
      "votes": null
    },
    {
      "id": "802130",
      "postDate": "04/09/2020 06:54:37",
      "content": "<p>1) As <code>Dave E</code> mentioned you have been using models from sckit-learn  (also you are using sckit-learn API of XGBoost); here <code>predict</code> spits out 0 and 1 that can only used for something like f1 score or accuracy. You need use <code>predict_proba</code> to get probalities and then use the second column (Pr{y=1|X}).\n2) It is a ranking problem (hence the AUC metric) so you should improve AUC not accuacy or some other metric. </p>",
      "rawMarkdown": "1) As `Dave E` mentioned you have been using models from sckit-learn  (also you are using sckit-learn API of XGBoost); here `predict` spits out 0 and 1 that can only used for something like f1 score or accuracy. You need use `predict_proba` to get probalities and then use the second column (Pr{y=1|X}).\n2) It is a ranking problem (hence the AUC metric) so you should improve AUC not accuacy or some other metric.",
      "votes": null
    },
    {
      "id": "802396",
      "postDate": "04/09/2020 13:28:52",
      "content": "<p>Hey, </p>\n\n<p>You were totally right.\nAfter modifying my code (according to predict_proba), I achieve 74% of accuracy. </p>\n\n<p>Thank a lot! \nI will update my code and let it online to help.</p>",
      "rawMarkdown": "Hey, \n\nYou were totally right.\nAfter modifying my code (according to predict_proba), I achieve 74% of accuracy. \n\nThank a lot! \nI will update my code and let it online to help.",
      "votes": null
    },
    {
      "id": "807221",
      "postDate": "04/14/2020 13:39:50",
      "content": "<p>Just an idea, Try using OneHotEncoder for the named features, it is more appropriate. I got a better result using it.\nYou may check also my notebook for this competition, <a href=\"https://www.kaggle.com/catadanna/categorical-encoding-my-solution\">here</a>.</p>",
      "rawMarkdown": "Just an idea, Try using OneHotEncoder for the named features, it is more appropriate. I got a better result using it.\nYou may check also my notebook for this competition, [here](https://www.kaggle.com/catadanna/categorical-encoding-my-solution).",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 801912,
      "author_name": "davidedwards1",
      "author_url": "",
      "post_date": "04/08/2020 23:48:38",
      "content": "<p>Hi, am not an experienced kaggler but just answering as I think I had the same problem as you when I ran my first notebook - is your model set to predict, rather than predict_proba?</p>\n\n<p>Think you need the prediction of probabilities to get the ROC AUC as per the leaderboard</p>\n\n<p>Apologies in advance if this is not the right answer...</p>\n\n<p>p.s. think submission also needs % probability not predicted 0 or 1 list</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 802130,
      "author_name": "kainsama",
      "author_url": "",
      "post_date": "04/09/2020 06:54:37",
      "content": "<p>1) As <code>Dave E</code> mentioned you have been using models from sckit-learn  (also you are using sckit-learn API of XGBoost); here <code>predict</code> spits out 0 and 1 that can only used for something like f1 score or accuracy. You need use <code>predict_proba</code> to get probalities and then use the second column (Pr{y=1|X}).\n2) It is a ranking problem (hence the AUC metric) so you should improve AUC not accuacy or some other metric. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 802396,
      "author_name": "niscreed",
      "author_url": "",
      "post_date": "04/09/2020 13:28:52",
      "content": "<p>Hey, </p>\n\n<p>You were totally right.\nAfter modifying my code (according to predict_proba), I achieve 74% of accuracy. </p>\n\n<p>Thank a lot! \nI will update my code and let it online to help.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 807221,
      "author_name": "catadanna",
      "author_url": "",
      "post_date": "04/14/2020 13:39:50",
      "content": "<p>Just an idea, Try using OneHotEncoder for the named features, it is more appropriate. I got a better result using it.\nYou may check also my notebook for this competition, <a href=\"https://www.kaggle.com/catadanna/categorical-encoding-my-solution\">here</a>.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "801815": "Hi, \nI hope you are good! \n\nI started this kernel to learn a bit more about \"Feature Encoding\", because it seems to me to be the most important in data science (Data in the center you know). \n\nThe thing is I'm actually blocked at an \"accuracy\" of ~58%. I started by making my own kernel, and when I realized I can't reach more than 60% of \"accuracy\", I helped myself by reading some kernel in this section. \n\nNow, after changing my code, the problem persists. After reading and reading my code, I don't understand where I missed something. I know that I can optimize my result (Outliers, skewed values, more models, fillna() with better values ...) but my problem is to understand WHERE I made a mistake in my reasoning. \n\nIf someone can help me, I would be grateful! \nAbove my kernel : \nhttps://www.kaggle.com/niscreed/auc-bloqued-at-55",
    "801912": "Hi, am not an experienced kaggler but just answering as I think I had the same problem as you when I ran my first notebook - is your model set to predict, rather than predict_proba?\n\nThink you need the prediction of probabilities to get the ROC AUC as per the leaderboard\n\nApologies in advance if this is not the right answer...\n\np.s. think submission also needs % probability not predicted 0 or 1 list",
    "802130": "1) As `Dave E` mentioned you have been using models from sckit-learn  (also you are using sckit-learn API of XGBoost); here `predict` spits out 0 and 1 that can only used for something like f1 score or accuracy. You need use `predict_proba` to get probalities and then use the second column (Pr{y=1|X}).\n2) It is a ranking problem (hence the AUC metric) so you should improve AUC not accuacy or some other metric.",
    "802396": "Hey, \n\nYou were totally right.\nAfter modifying my code (according to predict_proba), I achieve 74% of accuracy. \n\nThank a lot! \nI will update my code and let it online to help.",
    "807221": "Just an idea, Try using OneHotEncoder for the named features, it is more appropriate. I got a better result using it.\nYou may check also my notebook for this competition, [here](https://www.kaggle.com/catadanna/categorical-encoding-my-solution)."
  },
  "source": "meta"
}