{
  "id": 10818,
  "title": "Did someone tried a Naive Bayes classifier ? ",
  "url": "/competitions/avazu-ctr-prediction/discussion/10818",
  "author_name": "",
  "post_date": "2014-11-01T17:29:46.603Z",
  "votes": null,
  "comment_count": 5,
  "views": 3686,
  "content": "<p>Hello everybody,</p>\n<p>I have implemented a naive Bayes from scratch in C++. I can't get a better score than 0.6 with my algorithm.</p>\n<p>I don't know if this bad score is caused by a bug in my program, or if the assumptions done by the naive Bayes are simply too limiting do get a decent score for this type of problem.</p>\n<p>Has anyone else tried a NB for this challenge? Which score did you get?</p>\n<p>Thanks !</p>",
  "messages": [
    {
      "id": "57167",
      "postDate": "11/01/2014 17:29:46",
      "content": "<p>Hello everybody,</p>\n<p>I have implemented a naive Bayes from scratch in C++. I can't get a better score than 0.6 with my algorithm.</p>\n<p>I don't know if this bad score is caused by a bug in my program, or if the assumptions done by the naive Bayes are simply too limiting do get a decent score for this type of problem.</p>\n<p>Has anyone else tried a NB for this challenge? Which score did you get?</p>\n<p>Thanks !</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57386",
      "postDate": "11/06/2014 05:54:36",
      "content": "<p>I plan to do naive Bayes too, but I am just starting. Will post my results in next few days!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60113",
      "postDate": "12/12/2014 17:36:50",
      "content": "<p>i have tried NB via numeric features. the best score i have ever got is 0.699!!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60191",
      "postDate": "12/14/2014 16:23:49",
      "content": "<p>I tried a Naive Bayes implementation in Java that I downloaded off github. &nbsp;(Sorry, I don't have the link.) &nbsp;I was running out of memory because the hash table they employed was not so good so I skipped two features: device_id and device_ip. &nbsp;</p>\n<p>I then assigned a probability as follows p = p_click/(p_click + p_noclick) &nbsp; where p_click was the NB probability of a click and p_noclick was the NB probability of no_click. &nbsp;I'm sure this is a stupid way to assign a probability but I wanted a fast test to see if there was any promise.</p>\n<p>I got a&nbsp;0.4296209 doing that, which is ok but not all that great. &nbsp;It didn't blend well with the other methods I tried. &nbsp;I think I'll look for a better classifier but may revisit if I get desperate :).&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "60194",
      "postDate": "12/14/2014 17:28:44",
      "content": "<p>[quote=ThePig;60191]</p>\n<p>I got a&nbsp;0.4296209 doing that, which is ok but not all that great.&nbsp;</p>\n<p>[/quote]</p>\n<p>As a point of calibration,&nbsp;you can get a score of 0.44 just by submitting all test values as 0.16. So, any method that doesn't score below 0.40 is pretty poor.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "61538",
      "postDate": "12/19/2014 11:31:34",
      "content": "<p>Naive Bayes assumes that the features are independent to each other. But in fact there are interactions between the features, so i think Naive Bayes is too 'naive' for this problem.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 57386,
      "author_name": "",
      "author_url": "",
      "post_date": "11/06/2014 05:54:36",
      "content": "<p>I plan to do naive Bayes too, but I am just starting. Will post my results in next few days!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60113,
      "author_name": "shirazunimilad",
      "author_url": "",
      "post_date": "12/12/2014 17:36:50",
      "content": "<p>i have tried NB via numeric features. the best score i have ever got is 0.699!!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60191,
      "author_name": "thepig",
      "author_url": "",
      "post_date": "12/14/2014 16:23:49",
      "content": "<p>I tried a Naive Bayes implementation in Java that I downloaded off github. &nbsp;(Sorry, I don't have the link.) &nbsp;I was running out of memory because the hash table they employed was not so good so I skipped two features: device_id and device_ip. &nbsp;</p>\n<p>I then assigned a probability as follows p = p_click/(p_click + p_noclick) &nbsp; where p_click was the NB probability of a click and p_noclick was the NB probability of no_click. &nbsp;I'm sure this is a stupid way to assign a probability but I wanted a fast test to see if there was any promise.</p>\n<p>I got a&nbsp;0.4296209 doing that, which is ok but not all that great. &nbsp;It didn't blend well with the other methods I tried. &nbsp;I think I'll look for a better classifier but may revisit if I get desperate :).&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 60194,
      "author_name": "inversion",
      "author_url": "",
      "post_date": "12/14/2014 17:28:44",
      "content": "<p>[quote=ThePig;60191]</p>\n<p>I got a&nbsp;0.4296209 doing that, which is ok but not all that great.&nbsp;</p>\n<p>[/quote]</p>\n<p>As a point of calibration,&nbsp;you can get a score of 0.44 just by submitting all test values as 0.16. So, any method that doesn't score below 0.40 is pretty poor.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 61538,
      "author_name": "linhaoye",
      "author_url": "",
      "post_date": "12/19/2014 11:31:34",
      "content": "<p>Naive Bayes assumes that the features are independent to each other. But in fact there are interactions between the features, so i think Naive Bayes is too 'naive' for this problem.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "57167": "",
    "57386": "",
    "60113": "",
    "60191": "",
    "60194": "",
    "61538": ""
  },
  "source": "meta"
}