{
  "id": 23870,
  "title": "CV vs Leaderboard scores",
  "url": "/competitions/bosch-production-line-performance/discussion/23870",
  "author_name": "",
  "post_date": "2016-09-23T23:43:20.970Z",
  "votes": 3,
  "comment_count": 9,
  "views": 1452,
  "content": "<p>It is a rule in Kaggle that every competition must have a thread about the gap between local validation/cv scores and leaderboard scores. We don't seem to have one yet, so here goes...    </p>\n\n<p>My LB scores are usually about 0.01-0.02 higher than local validation. I'm using a fixed random set of about 1/5 of the data for validation. There seems to be a trend in which higher performing models have a bigger gap in favor of the LB. The 0.283 score that I'm showing right now got 0.257 locally. My previous public score of 0.231 was on a model that got 0.220 locally. For my lowest performing models the gap is 0. The only model that I've had for which the gap was negative turned out to have a leak in it.</p>\n\n<p>Please add your thoughts and experiences below.</p>",
  "messages": [
    {
      "id": "136685",
      "postDate": "09/23/2016 23:43:20",
      "content": "<p>It is a rule in Kaggle that every competition must have a thread about the gap between local validation/cv scores and leaderboard scores. We don't seem to have one yet, so here goes...    </p>\n\n<p>My LB scores are usually about 0.01-0.02 higher than local validation. I'm using a fixed random set of about 1/5 of the data for validation. There seems to be a trend in which higher performing models have a bigger gap in favor of the LB. The 0.283 score that I'm showing right now got 0.257 locally. My previous public score of 0.231 was on a model that got 0.220 locally. For my lowest performing models the gap is 0. The only model that I've had for which the gap was negative turned out to have a leak in it.</p>\n\n<p>Please add your thoughts and experiences below.</p>",
      "rawMarkdown": "It is a rule in Kaggle that every competition must have a thread about the gap between local validation/cv scores and leaderboard scores. We don't seem to have one yet, so here goes...    \r\n\r\nMy LB scores are usually about 0.01-0.02 higher than local validation. I'm using a fixed random set of about 1/5 of the data for validation. There seems to be a trend in which higher performing models have a bigger gap in favor of the LB. The 0.283 score that I'm showing right now got 0.257 locally. My previous public score of 0.231 was on a model that got 0.220 locally. For my lowest performing models the gap is 0. The only model that I've had for which the gap was negative turned out to have a leak in it.\r\n\r\nPlease add your thoughts and experiences below.",
      "votes": null
    },
    {
      "id": "136697",
      "postDate": "09/24/2016 01:52:25",
      "content": "<p>I'm getting between 0.0048 and 0.016 between the local validation and leader board score using  10 percent of the data. Validation score is always higher.</p>",
      "rawMarkdown": "I'm getting between 0.0048 and 0.016 between the local validation and leader board score using  10 percent of the data. Validation score is always higher.",
      "votes": null
    },
    {
      "id": "136698",
      "postDate": "09/24/2016 02:03:40",
      "content": "<p>I am doing the same CV scheme, my scores are a bit off as well but direction holds.</p>\n\n<p>Here there are some models (CV vs LB): <br>\n0.29788 vs 0.29815 <br>\n0.25388 vs 0.24889</p>",
      "rawMarkdown": "I am doing the same CV scheme, my scores are a bit off as well but direction holds.\r\n\r\nHere there are some models (CV vs LB):  \r\n0.29788 vs 0.29815   \r\n0.25388 vs 0.24889",
      "votes": null
    },
    {
      "id": "136802",
      "postDate": "09/25/2016 11:06:06",
      "content": "<p>Hi everyone,</p>\n\n<p>My scores are as follows now. \n$$\n\\begin{array}{|c|c|}\n\\hline \\bf{data} &amp; \\bf{score(mcc)} \\\\ \\hline\n\\hline \\rm{Training} &amp; 0.634 \\\\ \\hline\n\\hline \\rm{Validation} &amp; 0.312 \\\\ \\hline\n\\hline \\rm{Public \\space Leaderboard} &amp; 0.301 \\\\ \\hline\n\\end{array}\n$$</p>\n\n<p>I use 10% of data for validation.<br></p>",
      "rawMarkdown": "Hi everyone,\r\n\r\nMy scores are as follows now. \r\n$$\r\n\\begin{array}{|c|c|}\r\n\\hline \\bf{data} & \\bf{score(mcc)} \\\\ \\hline\r\n\\hline \\rm{Training} & 0.634 \\\\ \\hline\r\n\\hline \\rm{Validation} & 0.312 \\\\ \\hline\r\n\\hline \\rm{Public \\space Leaderboard} & 0.301 \\\\ \\hline\r\n\\end{array}\r\n$$\r\n\r\nI use 10% of data for validation.<br>",
      "votes": null
    },
    {
      "id": "136803",
      "postDate": "09/25/2016 11:09:40",
      "content": "<p>For our current model:</p>\n\n<p>CV 0.4675 <br>\nLB 0.4676</p>\n\n<p>AUC 0.9212 ;)</p>",
      "rawMarkdown": "For our current model:\r\n\r\nCV 0.4675  \r\nLB 0.4676\r\n\r\nAUC 0.9212 ;)",
      "votes": null
    },
    {
      "id": "136804",
      "postDate": "09/25/2016 11:13:18",
      "content": "<p>My LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.</p>",
      "rawMarkdown": "My LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.",
      "votes": null
    },
    {
      "id": "136850",
      "postDate": "09/25/2016 20:32:46",
      "content": "<p>[quote=anokas;136803]</p>\n\n<p>For our current model:</p>\n\n<p>CV 0.4675 <br>\nLB 0.4676</p>\n\n<p>AUC 0.9212 ;)</p>\n\n<p>[/quote]</p>\n\n<p>This is impressive. Are you using some special learning framework that is different from the usual classification setting (e.g. the popular public script)? It seems the answer is yes!</p>",
      "rawMarkdown": "[quote=anokas;136803]\r\n\r\nFor our current model:\r\n\r\nCV 0.4675  \r\nLB 0.4676\r\n\r\nAUC 0.9212 ;)\r\n\r\n[/quote]\r\n\r\n\r\nThis is impressive. Are you using some special learning framework that is different from the usual classification setting (e.g. the popular public script)? It seems the answer is yes!",
      "votes": null
    },
    {
      "id": "136860",
      "postDate": "09/25/2016 21:47:03",
      "content": "<p>[quote=anokas;136803]</p>\n\n<p>For our current model:</p>\n\n<p>CV 0.4675 <br>\nLB 0.4676</p>\n\n<p>AUC 0.9212 ;)</p>\n\n<p>[/quote]\nShould not have mentioned AUC it reveals a lot ... :P</p>",
      "rawMarkdown": "[quote=anokas;136803]\r\n\r\nFor our current model:\r\n\r\nCV 0.4675  \r\nLB 0.4676\r\n\r\nAUC 0.9212 ;)\r\n\r\n[/quote]\r\nShould not have mentioned AUC it reveals a lot ... :P",
      "votes": null
    },
    {
      "id": "136910",
      "postDate": "09/26/2016 11:36:52",
      "content": "<p>[quote=Mike Kim;136804]</p>\n\n<p>My LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.</p>\n\n<p>[/quote]</p>\n\n<p>I have one fold giving 0.03 more than public LB. I've seen up to +0.04 too locally (but also up to -0.03). Mostly a matter of random seed as when I had such +0.03, all the other folds were under the public LB score. No feature engineering, pure stratified splitting.</p>\n\n<p>If I change the random seed I get different results, but the &quot;dominant/outlying&quot; fold remains. But when changing the metric, the shake up appears (the dominant/outlying fold is not anymore).</p>\n\n<p>CV is consistent with Public LB +- 0.01 after testing twice.</p>",
      "rawMarkdown": "[quote=Mike Kim;136804]\r\n\r\nMy LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.\r\n\r\n[/quote]\r\n\r\nI have one fold giving 0.03 more than public LB. I've seen up to +0.04 too locally (but also up to -0.03). Mostly a matter of random seed as when I had such +0.03, all the other folds were under the public LB score. No feature engineering, pure stratified splitting.\r\n\r\nIf I change the random seed I get different results, but the \"dominant/outlying\" fold remains. But when changing the metric, the shake up appears (the dominant/outlying fold is not anymore).\r\n\r\nCV is consistent with Public LB +- 0.01 after testing twice.",
      "votes": null
    },
    {
      "id": "136913",
      "postDate": "09/26/2016 12:25:57",
      "content": "<p>CV ~0.2411\nLB ~0.258</p>\n\n<p>with 5-fold stratCV</p>",
      "rawMarkdown": "CV ~0.2411\r\nLB ~0.258\r\n\r\nwith 5-fold stratCV",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 136697,
      "author_name": "notaapple",
      "author_url": "",
      "post_date": "09/24/2016 01:52:25",
      "content": "<p>I'm getting between 0.0048 and 0.016 between the local validation and leader board score using  10 percent of the data. Validation score is always higher.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136698,
      "author_name": "carloshuertas",
      "author_url": "",
      "post_date": "09/24/2016 02:03:40",
      "content": "<p>I am doing the same CV scheme, my scores are a bit off as well but direction holds.</p>\n\n<p>Here there are some models (CV vs LB): <br>\n0.29788 vs 0.29815 <br>\n0.25388 vs 0.24889</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136802,
      "author_name": "toshik",
      "author_url": "",
      "post_date": "09/25/2016 11:06:06",
      "content": "<p>Hi everyone,</p>\n\n<p>My scores are as follows now. \n$$\n\\begin{array}{|c|c|}\n\\hline \\bf{data} &amp; \\bf{score(mcc)} \\\\ \\hline\n\\hline \\rm{Training} &amp; 0.634 \\\\ \\hline\n\\hline \\rm{Validation} &amp; 0.312 \\\\ \\hline\n\\hline \\rm{Public \\space Leaderboard} &amp; 0.301 \\\\ \\hline\n\\end{array}\n$$</p>\n\n<p>I use 10% of data for validation.<br></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136803,
      "author_name": "anokas",
      "author_url": "",
      "post_date": "09/25/2016 11:09:40",
      "content": "<p>For our current model:</p>\n\n<p>CV 0.4675 <br>\nLB 0.4676</p>\n\n<p>AUC 0.9212 ;)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136804,
      "author_name": "mikeskim",
      "author_url": "",
      "post_date": "09/25/2016 11:13:18",
      "content": "<p>My LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136850,
      "author_name": "amazingbob",
      "author_url": "",
      "post_date": "09/25/2016 20:32:46",
      "content": "<p>[quote=anokas;136803]</p>\n\n<p>For our current model:</p>\n\n<p>CV 0.4675 <br>\nLB 0.4676</p>\n\n<p>AUC 0.9212 ;)</p>\n\n<p>[/quote]</p>\n\n<p>This is impressive. Are you using some special learning framework that is different from the usual classification setting (e.g. the popular public script)? It seems the answer is yes!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136860,
      "author_name": "outliar",
      "author_url": "",
      "post_date": "09/25/2016 21:47:03",
      "content": "<p>[quote=anokas;136803]</p>\n\n<p>For our current model:</p>\n\n<p>CV 0.4675 <br>\nLB 0.4676</p>\n\n<p>AUC 0.9212 ;)</p>\n\n<p>[/quote]\nShould not have mentioned AUC it reveals a lot ... :P</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136910,
      "author_name": "laurae2",
      "author_url": "",
      "post_date": "09/26/2016 11:36:52",
      "content": "<p>[quote=Mike Kim;136804]</p>\n\n<p>My LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.</p>\n\n<p>[/quote]</p>\n\n<p>I have one fold giving 0.03 more than public LB. I've seen up to +0.04 too locally (but also up to -0.03). Mostly a matter of random seed as when I had such +0.03, all the other folds were under the public LB score. No feature engineering, pure stratified splitting.</p>\n\n<p>If I change the random seed I get different results, but the &quot;dominant/outlying&quot; fold remains. But when changing the metric, the shake up appears (the dominant/outlying fold is not anymore).</p>\n\n<p>CV is consistent with Public LB +- 0.01 after testing twice.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 136913,
      "author_name": "stgrmks",
      "author_url": "",
      "post_date": "09/26/2016 12:25:57",
      "content": "<p>CV ~0.2411\nLB ~0.258</p>\n\n<p>with 5-fold stratCV</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "136685": "It is a rule in Kaggle that every competition must have a thread about the gap between local validation/cv scores and leaderboard scores. We don't seem to have one yet, so here goes...    \r\n\r\nMy LB scores are usually about 0.01-0.02 higher than local validation. I'm using a fixed random set of about 1/5 of the data for validation. There seems to be a trend in which higher performing models have a bigger gap in favor of the LB. The 0.283 score that I'm showing right now got 0.257 locally. My previous public score of 0.231 was on a model that got 0.220 locally. For my lowest performing models the gap is 0. The only model that I've had for which the gap was negative turned out to have a leak in it.\r\n\r\nPlease add your thoughts and experiences below.",
    "136697": "I'm getting between 0.0048 and 0.016 between the local validation and leader board score using  10 percent of the data. Validation score is always higher.",
    "136698": "I am doing the same CV scheme, my scores are a bit off as well but direction holds.\r\n\r\nHere there are some models (CV vs LB):  \r\n0.29788 vs 0.29815   \r\n0.25388 vs 0.24889",
    "136802": "Hi everyone,\r\n\r\nMy scores are as follows now. \r\n$$\r\n\\begin{array}{|c|c|}\r\n\\hline \\bf{data} & \\bf{score(mcc)} \\\\ \\hline\r\n\\hline \\rm{Training} & 0.634 \\\\ \\hline\r\n\\hline \\rm{Validation} & 0.312 \\\\ \\hline\r\n\\hline \\rm{Public \\space Leaderboard} & 0.301 \\\\ \\hline\r\n\\end{array}\r\n$$\r\n\r\nI use 10% of data for validation.<br>",
    "136803": "For our current model:\r\n\r\nCV 0.4675  \r\nLB 0.4676\r\n\r\nAUC 0.9212 ;)",
    "136804": "My LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.",
    "136850": "[quote=anokas;136803]\r\n\r\nFor our current model:\r\n\r\nCV 0.4675  \r\nLB 0.4676\r\n\r\nAUC 0.9212 ;)\r\n\r\n[/quote]\r\n\r\n\r\nThis is impressive. Are you using some special learning framework that is different from the usual classification setting (e.g. the popular public script)? It seems the answer is yes!",
    "136860": "[quote=anokas;136803]\r\n\r\nFor our current model:\r\n\r\nCV 0.4675  \r\nLB 0.4676\r\n\r\nAUC 0.9212 ;)\r\n\r\n[/quote]\r\nShould not have mentioned AUC it reveals a lot ... :P",
    "136910": "[quote=Mike Kim;136804]\r\n\r\nMy LB scores are about 0.01-0.02 higher than local validation as well. I believe those who claim LB 0.01-0.02 lower than validation are likely using meta features, Bayesian encoded features, or the out of fold target based features. You can correct me if I'm mistaken.\r\n\r\n[/quote]\r\n\r\nI have one fold giving 0.03 more than public LB. I've seen up to +0.04 too locally (but also up to -0.03). Mostly a matter of random seed as when I had such +0.03, all the other folds were under the public LB score. No feature engineering, pure stratified splitting.\r\n\r\nIf I change the random seed I get different results, but the \"dominant/outlying\" fold remains. But when changing the metric, the shake up appears (the dominant/outlying fold is not anymore).\r\n\r\nCV is consistent with Public LB +- 0.01 after testing twice.",
    "136913": "CV ~0.2411\r\nLB ~0.258\r\n\r\nwith 5-fold stratCV"
  },
  "source": "meta"
}