{
  "id": 186858,
  "title": "Do you use magic?",
  "url": "/competitions/osic-pulmonary-fibrosis-progression/discussion/186858",
  "author_name": "",
  "post_date": "2020-09-26T10:00:59.530116200Z",
  "votes": 10,
  "comment_count": 10,
  "views": 0,
  "content": "<p>Some high scoring public kernels multiply a certain coefficient (0.996) to the predicted FVC (like <a href=\"https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter\" target=\"_blank\">this one</a>). This multiply-something-for-better-score, or so-called \"magic\" approach, had been actually useful for some kaggle competitions in the past (e.g. M5), especially in the context of future forecasting.</p>\n<p>Given we are predicting mostly declines in the lung function in the future, using a \"magic\" less than 1 (e.g. 0.996) may be actually a good idea for a better private score. I may use it in one of my submissions.</p>\n<p>Would you use it in your final submission, or would you rather stay away from it? It would be great if you could share your idea on this topic.</p>",
  "messages": [
    {
      "id": "1027715",
      "postDate": "09/26/2020 10:00:59",
      "content": "<p>Some high scoring public kernels multiply a certain coefficient (0.996) to the predicted FVC (like <a href=\"https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter\" target=\"_blank\">this one</a>). This multiply-something-for-better-score, or so-called \"magic\" approach, had been actually useful for some kaggle competitions in the past (e.g. M5), especially in the context of future forecasting.</p>\n<p>Given we are predicting mostly declines in the lung function in the future, using a \"magic\" less than 1 (e.g. 0.996) may be actually a good idea for a better private score. I may use it in one of my submissions.</p>\n<p>Would you use it in your final submission, or would you rather stay away from it? It would be great if you could share your idea on this topic.</p>",
      "rawMarkdown": "Some high scoring public kernels multiply a certain coefficient (0.996) to the predicted FVC (like [this one](https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter)). This multiply-something-for-better-score, or so-called \"magic\" approach, had been actually useful for some kaggle competitions in the past (e.g. M5), especially in the context of future forecasting.\n\nGiven we are predicting mostly declines in the lung function in the future, using a \"magic\" less than 1 (e.g. 0.996) may be actually a good idea for a better private score. I may use it in one of my submissions.\n\nWould you use it in your final submission, or would you rather stay away from it? It would be great if you could share your idea on this topic.",
      "votes": null
    },
    {
      "id": "1027767",
      "postDate": "09/26/2020 10:51:27",
      "content": "<p>Since when overfitting to public test set is called \"magic\"?</p>",
      "rawMarkdown": "Since when overfitting to public test set is called \"magic\"?",
      "votes": null
    },
    {
      "id": "1027788",
      "postDate": "09/26/2020 11:12:59",
      "content": "<p>Since the M5, to my knowledge.</p>",
      "rawMarkdown": "Since the M5, to my knowledge.",
      "votes": null
    },
    {
      "id": "1028234",
      "postDate": "09/26/2020 17:42:27",
      "content": "<p>Right, I can't argue with that. I would use a multiplier like that if only I am able to detect higher predictions consistently. I would also test it on oof not public test set.</p>",
      "rawMarkdown": "Right, I can't argue with that. I would use a multiplier like that if only I am able to detect higher predictions consistently. I would also test it on oof not public test set.",
      "votes": null
    },
    {
      "id": "1028245",
      "postDate": "09/26/2020 17:49:49",
      "content": "<p>Yeah, <a href=\"https://www.kaggle.com/gunesevitan\" target=\"_blank\">@gunesevitan</a> is right, checked that public kernel and it's going to overfit, so maybe it's not magic!!!  Thank you</p>",
      "rawMarkdown": "Yeah, @gunesevitan is right, checked that public kernel and it's going to overfit, so maybe it's not magic!!!  Thank you",
      "votes": null
    },
    {
      "id": "1028455",
      "postDate": "09/26/2020 21:35:23",
      "content": "<p>An interesting question is to what extent you would trust something, if it works in cross-validation, when you have picked it based on what happens out-of-fold in cross-validation (I'm worried about overfitting the \"magic\" to the errors in my out-of-fold predictions). I'd assume with way larger datasets that would not be that much of an issue, but with so little data this is presumably much more of a concern. Perhaps the LB is - despite its small size - the way to check whether something like that, which looks good in CV, holds up?</p>",
      "rawMarkdown": "An interesting question is to what extent you would trust something, if it works in cross-validation, when you have picked it based on what happens out-of-fold in cross-validation (I'm worried about overfitting the \"magic\" to the errors in my out-of-fold predictions). I'd assume with way larger datasets that would not be that much of an issue, but with so little data this is presumably much more of a concern. Perhaps the LB is - despite its small size - the way to check whether something like that, which looks good in CV, holds up?",
      "votes": null
    },
    {
      "id": "1028717",
      "postDate": "09/27/2020 06:20:36",
      "content": "<p>Tuning constants and messing around with the random seed - not a good way to go, given how many of the participants have used the 'mloss' constant of a certain public kernel (public kernels?) to get past -6.81 and how seed dependent the kernel is.</p>",
      "rawMarkdown": "Tuning constants and messing around with the random seed - not a good way to go, given how many of the participants have used the 'mloss' constant of a certain public kernel (public kernels?) to get past -6.81 and how seed dependent the kernel is.",
      "votes": null
    },
    {
      "id": "1029358",
      "postDate": "09/27/2020 17:19:59",
      "content": "<p>Does this magic improve cv score too? We can't really rely on public leaderboard since its too small. I remember something similar approach helped in Trends neuroimaging competition. </p>",
      "rawMarkdown": "Does this magic improve cv score too? We can't really rely on public leaderboard since its too small. I remember something similar approach helped in Trends neuroimaging competition.",
      "votes": null
    },
    {
      "id": "1032089",
      "postDate": "09/30/2020 00:18:27",
      "content": "<p>If the \"magic\" number cannot be explained, is it truly magical? How could you know if heretofore unseen data would react similarly?</p>",
      "rawMarkdown": "If the \"magic\" number cannot be explained, is it truly magical? How could you know if heretofore unseen data would react similarly?",
      "votes": null
    },
    {
      "id": "1032161",
      "postDate": "09/30/2020 02:28:11",
      "content": "<blockquote>\n  <p>If the \"magic\" number cannot be explained, is it truly magical?</p>\n</blockquote>\n<p>These constants help to \"tune\" your predictions better towards the Public LB, however as Gunes said it's probably a better approach to test it on OOF instead of public test.</p>\n<blockquote>\n  <p>How could you know if heretofore unseen data would react similarly?</p>\n</blockquote>\n<p>We don't, and that's what blew up the M5 leaderboard.</p>",
      "rawMarkdown": "> If the \"magic\" number cannot be explained, is it truly magical?\n\nThese constants help to \"tune\" your predictions better towards the Public LB, however as Gunes said it's probably a better approach to test it on OOF instead of public test.\n\n> How could you know if heretofore unseen data would react similarly?\n\nWe don't, and that's what blew up the M5 leaderboard.",
      "votes": null
    },
    {
      "id": "1034847",
      "postDate": "10/02/2020 08:28:18",
      "content": "<p>I use the pinball loss in my model with quantiles around [0.25, 0.5, 0.75]. For each fold, I try to minimise globally the loss on my fvc and confidence results by using scipy.optimize.minimize; then I use the coefficients before averaging the OOF predictions to produce my final predictions.<br>\nIt gives me a bit less than +0.01 on my public score.</p>",
      "rawMarkdown": "I use the pinball loss in my model with quantiles around [0.25, 0.5, 0.75]. For each fold, I try to minimise globally the loss on my fvc and confidence results by using scipy.optimize.minimize; then I use the coefficients before averaging the OOF predictions to produce my final predictions.\nIt gives me a bit less than +0.01 on my public score.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1027767,
      "author_name": "gunesevitan",
      "author_url": "",
      "post_date": "09/26/2020 10:51:27",
      "content": "<p>Since when overfitting to public test set is called \"magic\"?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1027788,
          "author_name": "code1110",
          "author_url": "",
          "post_date": "09/26/2020 11:12:59",
          "content": "<p>Since the M5, to my knowledge.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1028234,
          "author_name": "gunesevitan",
          "author_url": "",
          "post_date": "09/26/2020 17:42:27",
          "content": "<p>Right, I can't argue with that. I would use a multiplier like that if only I am able to detect higher predictions consistently. I would also test it on oof not public test set.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1028245,
          "author_name": "",
          "author_url": "",
          "post_date": "09/26/2020 17:49:49",
          "content": "<p>Yeah, <a href=\"https://www.kaggle.com/gunesevitan\" target=\"_blank\">@gunesevitan</a> is right, checked that public kernel and it's going to overfit, so maybe it's not magic!!!  Thank you</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1028455,
          "author_name": "bjoernholzhauer",
          "author_url": "",
          "post_date": "09/26/2020 21:35:23",
          "content": "<p>An interesting question is to what extent you would trust something, if it works in cross-validation, when you have picked it based on what happens out-of-fold in cross-validation (I'm worried about overfitting the \"magic\" to the errors in my out-of-fold predictions). I'd assume with way larger datasets that would not be that much of an issue, but with so little data this is presumably much more of a concern. Perhaps the LB is - despite its small size - the way to check whether something like that, which looks good in CV, holds up?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1028717,
          "author_name": "nxrprime",
          "author_url": "",
          "post_date": "09/27/2020 06:20:36",
          "content": "<p>Tuning constants and messing around with the random seed - not a good way to go, given how many of the participants have used the 'mloss' constant of a certain public kernel (public kernels?) to get past -6.81 and how seed dependent the kernel is.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1029358,
      "author_name": "nischaydnk",
      "author_url": "",
      "post_date": "09/27/2020 17:19:59",
      "content": "<p>Does this magic improve cv score too? We can't really rely on public leaderboard since its too small. I remember something similar approach helped in Trends neuroimaging competition. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1032089,
      "author_name": "avrahamadler",
      "author_url": "",
      "post_date": "09/30/2020 00:18:27",
      "content": "<p>If the \"magic\" number cannot be explained, is it truly magical? How could you know if heretofore unseen data would react similarly?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1032161,
          "author_name": "nxrprime",
          "author_url": "",
          "post_date": "09/30/2020 02:28:11",
          "content": "<blockquote>\n  <p>If the \"magic\" number cannot be explained, is it truly magical?</p>\n</blockquote>\n<p>These constants help to \"tune\" your predictions better towards the Public LB, however as Gunes said it's probably a better approach to test it on OOF instead of public test.</p>\n<blockquote>\n  <p>How could you know if heretofore unseen data would react similarly?</p>\n</blockquote>\n<p>We don't, and that's what blew up the M5 leaderboard.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1034847,
      "author_name": "filipix",
      "author_url": "",
      "post_date": "10/02/2020 08:28:18",
      "content": "<p>I use the pinball loss in my model with quantiles around [0.25, 0.5, 0.75]. For each fold, I try to minimise globally the loss on my fvc and confidence results by using scipy.optimize.minimize; then I use the coefficients before averaging the OOF predictions to produce my final predictions.<br>\nIt gives me a bit less than +0.01 on my public score.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1027715": "Some high scoring public kernels multiply a certain coefficient (0.996) to the predicted FVC (like [this one](https://www.kaggle.com/ulrich07/osic-multiple-quantile-regression-starter)). This multiply-something-for-better-score, or so-called \"magic\" approach, had been actually useful for some kaggle competitions in the past (e.g. M5), especially in the context of future forecasting.\n\nGiven we are predicting mostly declines in the lung function in the future, using a \"magic\" less than 1 (e.g. 0.996) may be actually a good idea for a better private score. I may use it in one of my submissions.\n\nWould you use it in your final submission, or would you rather stay away from it? It would be great if you could share your idea on this topic.",
    "1027767": "Since when overfitting to public test set is called \"magic\"?",
    "1027788": "Since the M5, to my knowledge.",
    "1028234": "Right, I can't argue with that. I would use a multiplier like that if only I am able to detect higher predictions consistently. I would also test it on oof not public test set.",
    "1028245": "Yeah, @gunesevitan is right, checked that public kernel and it's going to overfit, so maybe it's not magic!!!  Thank you",
    "1028455": "An interesting question is to what extent you would trust something, if it works in cross-validation, when you have picked it based on what happens out-of-fold in cross-validation (I'm worried about overfitting the \"magic\" to the errors in my out-of-fold predictions). I'd assume with way larger datasets that would not be that much of an issue, but with so little data this is presumably much more of a concern. Perhaps the LB is - despite its small size - the way to check whether something like that, which looks good in CV, holds up?",
    "1028717": "Tuning constants and messing around with the random seed - not a good way to go, given how many of the participants have used the 'mloss' constant of a certain public kernel (public kernels?) to get past -6.81 and how seed dependent the kernel is.",
    "1029358": "Does this magic improve cv score too? We can't really rely on public leaderboard since its too small. I remember something similar approach helped in Trends neuroimaging competition.",
    "1032089": "If the \"magic\" number cannot be explained, is it truly magical? How could you know if heretofore unseen data would react similarly?",
    "1032161": "> If the \"magic\" number cannot be explained, is it truly magical?\n\nThese constants help to \"tune\" your predictions better towards the Public LB, however as Gunes said it's probably a better approach to test it on OOF instead of public test.\n\n> How could you know if heretofore unseen data would react similarly?\n\nWe don't, and that's what blew up the M5 leaderboard.",
    "1034847": "I use the pinball loss in my model with quantiles around [0.25, 0.5, 0.75]. For each fold, I try to minimise globally the loss on my fvc and confidence results by using scipy.optimize.minimize; then I use the coefficients before averaging the OOF predictions to produce my final predictions.\nIt gives me a bit less than +0.01 on my public score."
  },
  "source": "meta"
}