{
  "id": 6312,
  "title": "No luck with glmnet",
  "url": "/competitions/ams-2014-solar-energy-prediction-contest/discussion/6312",
  "author_name": "",
  "post_date": "2013-11-14T13:58:26.203Z",
  "votes": null,
  "comment_count": 4,
  "views": 2233,
  "content": "<p>Hi all</p>\n<p>I tried a very simple model glmnet under the assumption that it would work better than the simple&nbsp;Spline Interpolation Benchmark. But somehow it did not! I'm still very new to kaggle and ML in general. I made the code available as a gist https://gist.github.com/leobuettiker/7467042&nbsp;</p>\n<p>I'm highly interested in any feedback. Why does it not work better than the benchmark? Did I do a coding mistake? (I don't hope so!) Is glmnet the wrong model? Are the parameters wrong? Any input that would help me to understand my mistakes is highly appreciated. I hope I might do better on other competitions.</p>",
  "messages": [
    {
      "id": "33701",
      "postDate": "11/14/2013 13:58:26",
      "content": "<p>Hi all</p>\n<p>I tried a very simple model glmnet under the assumption that it would work better than the simple&nbsp;Spline Interpolation Benchmark. But somehow it did not! I'm still very new to kaggle and ML in general. I made the code available as a gist https://gist.github.com/leobuettiker/7467042&nbsp;</p>\n<p>I'm highly interested in any feedback. Why does it not work better than the benchmark? Did I do a coding mistake? (I don't hope so!) Is glmnet the wrong model? Are the parameters wrong? Any input that would help me to understand my mistakes is highly appreciated. I hope I might do better on other competitions.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "33708",
      "postDate": "11/14/2013 15:43:40",
      "content": "<p>i didnt fully grasp your model, but i think you should normalize your inputs first.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "33719",
      "postDate": "11/14/2013 19:32:24",
      "content": "<p>Thank you for your answer. I basically take all available date (from all stations) and try to build a model over this date for each station. I hope glmnet does feature selection for me. As far as I understand the <a href=\"http://cran.r-project.org/web/packages/glmnet/glmnet.pdf\">glmnet documentation</a>&nbsp;it should do normalization automatically. I tried to do it by myself before the model creation and got a even worse result. &nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "33720",
      "postDate": "11/14/2013 19:47:45",
      "content": "<p>I think you should be able to get around 2,240K with glmnet. &nbsp;There's a benchmark at&nbsp;<a href=\"http://fastml.com/predicting-solar-energy-from-weather-forecasts-plus-a-netcdf4-tutorial/\">http://fastml.com/predicting-solar-energy-from-weather-forecasts-plus-a-netcdf4-tutorial/</a> that does so in Python.</p>\n<p><span style=\"line-height: 1.4\">I didn't look super carefully at your code, but it looks like you're only using &quot;</span><span style=\"line-height: 1.4\">dswrf_sfc&quot;. &nbsp;I tried ignoring the other files for a short time too, but they seem to be useful.</span></p>\n<p>Also, I don't think that the spline interpolation benchmark is horrible. &nbsp;Splines have had a lot of smart people think about them for a long time, and a lot of that work was specifically for interpolation. &nbsp;Sometimes the benchmarks are really weak (like the random one), and sometimes they are not bad (like this one, or the Expedia one). &nbsp;Beating the better ones will generally require more than putting the same data into a slightly different algorithm :)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "35033",
      "postDate": "11/22/2013 11:32:22",
      "content": "<p>Thanks for your answer Mike!</p>\n<p>I tried some models with more date set. But unfortunately I did not get any good results, probably I have a bug somewhere. But I think now it's time to move on.</p>\n<p>I do think the spline benchmark is a good one. But I'm still surprised that It was not easy to beat it with using the training data.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 33708,
      "author_name": "leustagos",
      "author_url": "",
      "post_date": "11/14/2013 15:43:40",
      "content": "<p>i didnt fully grasp your model, but i think you should normalize your inputs first.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 33719,
      "author_name": "leobuettiker",
      "author_url": "",
      "post_date": "11/14/2013 19:32:24",
      "content": "<p>Thank you for your answer. I basically take all available date (from all stations) and try to build a model over this date for each station. I hope glmnet does feature selection for me. As far as I understand the <a href=\"http://cran.r-project.org/web/packages/glmnet/glmnet.pdf\">glmnet documentation</a>&nbsp;it should do normalization automatically. I tried to do it by myself before the model creation and got a even worse result. &nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 33720,
      "author_name": "mikescarpati",
      "author_url": "",
      "post_date": "11/14/2013 19:47:45",
      "content": "<p>I think you should be able to get around 2,240K with glmnet. &nbsp;There's a benchmark at&nbsp;<a href=\"http://fastml.com/predicting-solar-energy-from-weather-forecasts-plus-a-netcdf4-tutorial/\">http://fastml.com/predicting-solar-energy-from-weather-forecasts-plus-a-netcdf4-tutorial/</a> that does so in Python.</p>\n<p><span style=\"line-height: 1.4\">I didn't look super carefully at your code, but it looks like you're only using &quot;</span><span style=\"line-height: 1.4\">dswrf_sfc&quot;. &nbsp;I tried ignoring the other files for a short time too, but they seem to be useful.</span></p>\n<p>Also, I don't think that the spline interpolation benchmark is horrible. &nbsp;Splines have had a lot of smart people think about them for a long time, and a lot of that work was specifically for interpolation. &nbsp;Sometimes the benchmarks are really weak (like the random one), and sometimes they are not bad (like this one, or the Expedia one). &nbsp;Beating the better ones will generally require more than putting the same data into a slightly different algorithm :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 35033,
      "author_name": "leobuettiker",
      "author_url": "",
      "post_date": "11/22/2013 11:32:22",
      "content": "<p>Thanks for your answer Mike!</p>\n<p>I tried some models with more date set. But unfortunately I did not get any good results, probably I have a bug somewhere. But I think now it's time to move on.</p>\n<p>I do think the spline benchmark is a good one. But I'm still surprised that It was not easy to beat it with using the training data.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "33701": "",
    "33708": "",
    "33719": "",
    "33720": "",
    "35033": ""
  },
  "source": "meta"
}