{
  "id": 2912,
  "title": "Ideas sharing",
  "url": "/competitions/MerckActivity/discussion/2912",
  "author_name": "",
  "post_date": "2012-10-17T10:16:27.197Z",
  "votes": 1,
  "comment_count": 18,
  "views": 11032,
  "content": "<p>Hi, guys,</p>\r\n<p>What do you think about sharing of ideas we have used in this competiton?</p>\r\n<p>Unfortunately, I could not participate in this competiton since the beginning, so I just spent 2 weeks, but there are key points of my solution:</p>\r\n<p>1) Feature selection by running gbm with small number of trees for each set and choosing features with non-zero importance.</p>\r\n<p>2) Applying kmeans for train and test set with predefined number of clusters and taking labels of clusters as additional features.</p>\r\n<p>3) My best model was the linear combination of homogeneous ensembling of random forest and gbm (with features from the first step) correspondingly with coefficients chosen from cv predictions.</p>\r\n<p>Dmitry.</p>",
  "messages": [
    {
      "id": "15803",
      "postDate": "10/17/2012 10:16:27",
      "content": "<p>Hi, guys,</p>\r\n<p>What do you think about sharing of ideas we have used in this competiton?</p>\r\n<p>Unfortunately, I could not participate in this competiton since the beginning, so I just spent 2 weeks, but there are key points of my solution:</p>\r\n<p>1) Feature selection by running gbm with small number of trees for each set and choosing features with non-zero importance.</p>\r\n<p>2) Applying kmeans for train and test set with predefined number of clusters and taking labels of clusters as additional features.</p>\r\n<p>3) My best model was the linear combination of homogeneous ensembling of random forest and gbm (with features from the first step) correspondingly with coefficients chosen from cv predictions.</p>\r\n<p>Dmitry.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15814",
      "postDate": "10/17/2012 14:07:55",
      "content": "<p>Interesting. Did (2) help at all with improving the score?</p>\r\n<p>As for my idea, I just ran SVR without any sophisticated data pre-processing. I believe this alone is good enough to be in the top 10% roughly. To squeeze out some extra performance, tweaking SVR parameters helped.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15821",
      "postDate": "10/17/2012 15:14:03",
      "content": "<p><a class=\"x_profilelink\" title=\"View Shinmagi's profile\" href=\"http://www.kaggle.com/users/55048/shinmagi\">Shinmagi</a>, what is SVR? I'm not familiar with that.</p>\r\n<p>As for myself, I used tuned GBM models trained on different feature sets and then just averaged the results. It seems that a single tuned GBM model was enough to be in the top 25.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15822",
      "postDate": "10/17/2012 15:17:52",
      "content": "<p>dimitrim, by SVR, I meant support vector regression. More specifically, I used C-SVR instead of nu-SVR although nu-SVR showed some promise as well.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15823",
      "postDate": "10/17/2012 15:33:30",
      "content": "<p>Hi, Shinmagi,</p>\r\n<p>Yes, it helped. The improvement was about 0.002 for each set. Correlation with labels was about 0.40 for some sets (actually it was possible to get higher correlation if arrange labels and renumerate it).</p>\r\n<p>I have question about SVR: what software you used for it? As I understand, svm from package e1071 works for a long time on big data sets? So I suppose you used Python?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15824",
      "postDate": "10/17/2012 15:51:58",
      "content": "<p>I got terrible results from gbm</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15826",
      "postDate": "10/17/2012 16:12:01",
      "content": "<p>Hi, Black Magic,</p>\r\n<p>You used random forests, right? What accuracy you got with your model?</p>\r\n<p>In my random forests, average error for all sets was worse by 0.01 than gbm. Actually, I have not tuned parameters for random forests, I justs used default, I suppose that was the reason.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15832",
      "postDate": "10/17/2012 16:46:34",
      "content": "<p>Interesting. We also used a GBM with a small number of trees to select features. Our final models were various ensembles of GBF, RF, and SVR.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15834",
      "postDate": "10/17/2012 16:55:07",
      "content": "<p>I used Random forests with SVD and without SVD and also used SVM with and without scaling<br>\r\nRandom forests were giving me 0.43</p>\r\n<p>I finally ensembled all the models</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15837",
      "postDate": "10/17/2012 17:04:43",
      "content": "<p><a class=\"x_profilelink\" title=\"View Black Magic's profile\" href=\"http://www.kaggle.com/users/23831/black-magic\">Black Magic</a>, I got about the same results with RF, but didn't bother combining them. Can you describe how you ensembled different model together?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15839",
      "postDate": "10/17/2012 17:21:43",
      "content": "<p>My teammate and I tried to preprocess activity 1 to communicate to the models that they could predict anything under 4.3 for the left side of the distribution instead of forcing them to predict exactly 4.3. We ran out of time to work on it so it didn't help\r\n us, but I think we left a lot on the table in several of the activities.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15872",
      "postDate": "10/18/2012 03:13:51",
      "content": "<p>[quote=Dmitry Efimov;15823]</p>\r\n<p>Hi, Shinmagi,</p>\r\n<p>Yes, it helped. The improvement was about 0.002 for each set. Correlation with labels was about 0.40 for some sets (actually it was possible to get higher correlation if arrange labels and renumerate it).</p>\r\n<p>I have question about SVR: what software you used for it? As I understand, svm from package e1071 works for a long time on big data sets? So I suppose you used Python?</p>\r\n<p>[/quote]</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks for sharing the info. &nbsp;As for your question, Python works fine although I couldn't imagine R being much slower (is it?).</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15873",
      "postDate": "10/18/2012 03:17:06",
      "content": "<p>[quote=Black Magic;15834]</p>\r\n<p>I used Random forests with SVD and without SVD and also used SVM with and without scaling<br>\r\nRandom forests were giving me 0.43</p>\r\n<p>I finally ensembled all the models</p>\r\n<p>[/quote]</p>\r\n<p>For scaling, did you mean scaling by column the raw data? &nbsp;I personally didn't find it useful for this competition, but I am curious how it helped you out. &nbsp;Thanks.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15889",
      "postDate": "10/18/2012 13:50:17",
      "content": "<p>[quote=Shinmagi;15872]</p>\r\n<p>Thanks for sharing the info. &nbsp;As for your question, Python works fine although I couldn't imagine R being much slower (is it?).</p>\r\n<p>[/quote]</p>\r\n<p>&nbsp;</p>\r\n<p>We used&nbsp;e1071 for SVR in R. &nbsp;It's based on libsvm, which I think is the same library python uses, so the speed is probably similar.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15900",
      "postDate": "10/18/2012 18:07:59",
      "content": "<p>Interesting. Thanks for sharing guys. I did pre-process the data (described in pre-processing thread) which threw out 90% of the columns which enabled me to mess around with so many algos without wasting too much life.</p>\r\n<p>I used R throughout and ensembled GBM, RF, SVM, KQR, Gaussian Processes, KNN and Multi-Adaptive Regression Splines (package earth).</p>\r\n<p>I used the kernlab package for SVM, KQR and KNN. It seems there is quite a difference from SVM from kernlab and e1071. My best SVM score was 0.44484 which I think is some way off Shingmagi's, though maybe my pre-processing was an issue.</p>\r\n<p>I also found that I could do no wrong with GBM - the more trees I used the better the public board score got - so my final run was 20000 trees at 0.02 shrinkage which on its own scored\r\n</p>\r\n<p>I am also surprised by how good a score people got out of RF. My best RF run was 0.41275.</p>\r\n<p>Towards the end I played around with the ensemling mix by looking at the cross-corelation of the different predictions. While the earth package did not do that well on it's own (0.37347), it was way less correlated to all of the other predictions (typically\r\n less than 0.9 vs. well into 0.98&#43; for everything else), and it seemed to merit a disproportionate part in the final ensemble. But the backbone of everything was good old GBM....</p>\r\n<p>For cross validation, I used a proportion from the end (vs. random sampling) of the training set which was such that the proportion of train/cross validation sizes was equal to the train/test sizes. This gave extremely variable mileage - predicting the leaderboard\r\n score to within 0.01 for some algos and not even within 0.05 for others. I can't say that I nailed CV - my final submission was no more than a mildly educated guess.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15902",
      "postDate": "10/18/2012 18:48:50",
      "content": "<p>s445203, thanks for your input. Can you please elaborate about combining different models together into the final ensemble? I did simple averaging, but that's probably not very effective...</p>\r\n<p>Also, I greatly enjoy hearing about all the different stuff other people did. After working alone for 2 months and running out of ideas, it feels really refreshing.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15903",
      "postDate": "10/18/2012 19:24:21",
      "content": "<p>Dmitrim,</p>\r\n<p>For ensembling more sophisticated than simple averaging, a decent place to start would be&nbsp;</p>\r\n<p><a href=\"http://www.cs.cornell.edu/~caruana/ctp/ct.papers/caruana.icml04.icdm06long.pdf\">http://www.cs.cornell.edu/~caruana/ctp/ct.papers/caruana.icml04.icdm06long.pdf</a></p>\r\n<p>&nbsp;</p>\r\n<p>rg,</p>\r\n<p>K</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15904",
      "postDate": "10/18/2012 19:28:08",
      "content": "<p>@dmitrim - likewise on curiosity of how others did it!</p>\r\n<p>On the ensembling, I'd be hard pushed to describe anything I did as an &quot;approach&quot;. In the end, I did a simple weighted average mix, where GBM was something like 60% of the mix with the other models being a decreasing proportion based on how well they did\r\n individually at public leaderboard score. This was partly guided by reading the Market Makers' papers over at the Heritage Healthcare prize who had a strong weight of GBM in their ensembling. I maybe threw 5 or 6 submissions at optimising the mix but am likely\r\n nowhere near perfect.</p>\r\n<p>One other thing I tried which didn't work, was to select the individually best algorithms for each sub data set based on their CV score - i.e. splice algorithms rather than ensemble. This worked terribly - my CV score for the splice set was over 0.49 yet\r\n public leaderboard was only 0.43 or something - which was a heartbreak moment, I can tell you!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15914",
      "postDate": "10/18/2012 21:44:26",
      "content": "<p>Konrad Banachewicz, thanks for the link, I'll take a look.</p>\r\n<p>s445203, I also tried weighted mixing, but it seemed a bit like walking in the dark, e.g. if one model is better by 0.001 does that mean that I give it 10% more weight, 20, 30, etc. I used the public score a lot, but still could not find better weights than\r\n the fair average. At least I'm not the only one who tried doing that!</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 15814,
      "author_name": "shinmagi",
      "author_url": "",
      "post_date": "10/17/2012 14:07:55",
      "content": "<p>Interesting. Did (2) help at all with improving the score?</p>\r\n<p>As for my idea, I just ran SVR without any sophisticated data pre-processing. I believe this alone is good enough to be in the top 10% roughly. To squeeze out some extra performance, tweaking SVR parameters helped.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15821,
      "author_name": "dmitrim",
      "author_url": "",
      "post_date": "10/17/2012 15:14:03",
      "content": "<p><a class=\"x_profilelink\" title=\"View Shinmagi's profile\" href=\"http://www.kaggle.com/users/55048/shinmagi\">Shinmagi</a>, what is SVR? I'm not familiar with that.</p>\r\n<p>As for myself, I used tuned GBM models trained on different feature sets and then just averaged the results. It seems that a single tuned GBM model was enough to be in the top 25.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15822,
      "author_name": "shinmagi",
      "author_url": "",
      "post_date": "10/17/2012 15:17:52",
      "content": "<p>dimitrim, by SVR, I meant support vector regression. More specifically, I used C-SVR instead of nu-SVR although nu-SVR showed some promise as well.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15823,
      "author_name": "efimov",
      "author_url": "",
      "post_date": "10/17/2012 15:33:30",
      "content": "<p>Hi, Shinmagi,</p>\r\n<p>Yes, it helped. The improvement was about 0.002 for each set. Correlation with labels was about 0.40 for some sets (actually it was possible to get higher correlation if arrange labels and renumerate it).</p>\r\n<p>I have question about SVR: what software you used for it? As I understand, svm from package e1071 works for a long time on big data sets? So I suppose you used Python?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15824,
      "author_name": "rkirana",
      "author_url": "",
      "post_date": "10/17/2012 15:51:58",
      "content": "<p>I got terrible results from gbm</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15826,
      "author_name": "efimov",
      "author_url": "",
      "post_date": "10/17/2012 16:12:01",
      "content": "<p>Hi, Black Magic,</p>\r\n<p>You used random forests, right? What accuracy you got with your model?</p>\r\n<p>In my random forests, average error for all sets was worse by 0.01 than gbm. Actually, I have not tuned parameters for random forests, I justs used default, I suppose that was the reason.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15832,
      "author_name": "zachmayer",
      "author_url": "",
      "post_date": "10/17/2012 16:46:34",
      "content": "<p>Interesting. We also used a GBM with a small number of trees to select features. Our final models were various ensembles of GBF, RF, and SVR.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15834,
      "author_name": "rkirana",
      "author_url": "",
      "post_date": "10/17/2012 16:55:07",
      "content": "<p>I used Random forests with SVD and without SVD and also used SVM with and without scaling<br>\r\nRandom forests were giving me 0.43</p>\r\n<p>I finally ensembled all the models</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15837,
      "author_name": "dmitrim",
      "author_url": "",
      "post_date": "10/17/2012 17:04:43",
      "content": "<p><a class=\"x_profilelink\" title=\"View Black Magic's profile\" href=\"http://www.kaggle.com/users/23831/black-magic\">Black Magic</a>, I got about the same results with RF, but didn't bother combining them. Can you describe how you ensembled different model together?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15839,
      "author_name": "edge219878",
      "author_url": "",
      "post_date": "10/17/2012 17:21:43",
      "content": "<p>My teammate and I tried to preprocess activity 1 to communicate to the models that they could predict anything under 4.3 for the left side of the distribution instead of forcing them to predict exactly 4.3. We ran out of time to work on it so it didn't help\r\n us, but I think we left a lot on the table in several of the activities.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15872,
      "author_name": "shinmagi",
      "author_url": "",
      "post_date": "10/18/2012 03:13:51",
      "content": "<p>[quote=Dmitry Efimov;15823]</p>\r\n<p>Hi, Shinmagi,</p>\r\n<p>Yes, it helped. The improvement was about 0.002 for each set. Correlation with labels was about 0.40 for some sets (actually it was possible to get higher correlation if arrange labels and renumerate it).</p>\r\n<p>I have question about SVR: what software you used for it? As I understand, svm from package e1071 works for a long time on big data sets? So I suppose you used Python?</p>\r\n<p>[/quote]</p>\r\n<p>&nbsp;</p>\r\n<p>Thanks for sharing the info. &nbsp;As for your question, Python works fine although I couldn't imagine R being much slower (is it?).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15873,
      "author_name": "shinmagi",
      "author_url": "",
      "post_date": "10/18/2012 03:17:06",
      "content": "<p>[quote=Black Magic;15834]</p>\r\n<p>I used Random forests with SVD and without SVD and also used SVM with and without scaling<br>\r\nRandom forests were giving me 0.43</p>\r\n<p>I finally ensembled all the models</p>\r\n<p>[/quote]</p>\r\n<p>For scaling, did you mean scaling by column the raw data? &nbsp;I personally didn't find it useful for this competition, but I am curious how it helped you out. &nbsp;Thanks.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15889,
      "author_name": "zachmayer",
      "author_url": "",
      "post_date": "10/18/2012 13:50:17",
      "content": "<p>[quote=Shinmagi;15872]</p>\r\n<p>Thanks for sharing the info. &nbsp;As for your question, Python works fine although I couldn't imagine R being much slower (is it?).</p>\r\n<p>[/quote]</p>\r\n<p>&nbsp;</p>\r\n<p>We used&nbsp;e1071 for SVR in R. &nbsp;It's based on libsvm, which I think is the same library python uses, so the speed is probably similar.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15900,
      "author_name": "s445203",
      "author_url": "",
      "post_date": "10/18/2012 18:07:59",
      "content": "<p>Interesting. Thanks for sharing guys. I did pre-process the data (described in pre-processing thread) which threw out 90% of the columns which enabled me to mess around with so many algos without wasting too much life.</p>\r\n<p>I used R throughout and ensembled GBM, RF, SVM, KQR, Gaussian Processes, KNN and Multi-Adaptive Regression Splines (package earth).</p>\r\n<p>I used the kernlab package for SVM, KQR and KNN. It seems there is quite a difference from SVM from kernlab and e1071. My best SVM score was 0.44484 which I think is some way off Shingmagi's, though maybe my pre-processing was an issue.</p>\r\n<p>I also found that I could do no wrong with GBM - the more trees I used the better the public board score got - so my final run was 20000 trees at 0.02 shrinkage which on its own scored\r\n</p>\r\n<p>I am also surprised by how good a score people got out of RF. My best RF run was 0.41275.</p>\r\n<p>Towards the end I played around with the ensemling mix by looking at the cross-corelation of the different predictions. While the earth package did not do that well on it's own (0.37347), it was way less correlated to all of the other predictions (typically\r\n less than 0.9 vs. well into 0.98&#43; for everything else), and it seemed to merit a disproportionate part in the final ensemble. But the backbone of everything was good old GBM....</p>\r\n<p>For cross validation, I used a proportion from the end (vs. random sampling) of the training set which was such that the proportion of train/cross validation sizes was equal to the train/test sizes. This gave extremely variable mileage - predicting the leaderboard\r\n score to within 0.01 for some algos and not even within 0.05 for others. I can't say that I nailed CV - my final submission was no more than a mildly educated guess.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15902,
      "author_name": "dmitrim",
      "author_url": "",
      "post_date": "10/18/2012 18:48:50",
      "content": "<p>s445203, thanks for your input. Can you please elaborate about combining different models together into the final ensemble? I did simple averaging, but that's probably not very effective...</p>\r\n<p>Also, I greatly enjoy hearing about all the different stuff other people did. After working alone for 2 months and running out of ideas, it feels really refreshing.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15903,
      "author_name": "konradb",
      "author_url": "",
      "post_date": "10/18/2012 19:24:21",
      "content": "<p>Dmitrim,</p>\r\n<p>For ensembling more sophisticated than simple averaging, a decent place to start would be&nbsp;</p>\r\n<p><a href=\"http://www.cs.cornell.edu/~caruana/ctp/ct.papers/caruana.icml04.icdm06long.pdf\">http://www.cs.cornell.edu/~caruana/ctp/ct.papers/caruana.icml04.icdm06long.pdf</a></p>\r\n<p>&nbsp;</p>\r\n<p>rg,</p>\r\n<p>K</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15904,
      "author_name": "s445203",
      "author_url": "",
      "post_date": "10/18/2012 19:28:08",
      "content": "<p>@dmitrim - likewise on curiosity of how others did it!</p>\r\n<p>On the ensembling, I'd be hard pushed to describe anything I did as an &quot;approach&quot;. In the end, I did a simple weighted average mix, where GBM was something like 60% of the mix with the other models being a decreasing proportion based on how well they did\r\n individually at public leaderboard score. This was partly guided by reading the Market Makers' papers over at the Heritage Healthcare prize who had a strong weight of GBM in their ensembling. I maybe threw 5 or 6 submissions at optimising the mix but am likely\r\n nowhere near perfect.</p>\r\n<p>One other thing I tried which didn't work, was to select the individually best algorithms for each sub data set based on their CV score - i.e. splice algorithms rather than ensemble. This worked terribly - my CV score for the splice set was over 0.49 yet\r\n public leaderboard was only 0.43 or something - which was a heartbreak moment, I can tell you!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15914,
      "author_name": "dmitrim",
      "author_url": "",
      "post_date": "10/18/2012 21:44:26",
      "content": "<p>Konrad Banachewicz, thanks for the link, I'll take a look.</p>\r\n<p>s445203, I also tried weighted mixing, but it seemed a bit like walking in the dark, e.g. if one model is better by 0.001 does that mean that I give it 10% more weight, 20, 30, etc. I used the public score a lot, but still could not find better weights than\r\n the fair average. At least I'm not the only one who tried doing that!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "15803": "",
    "15814": "",
    "15821": "",
    "15822": "",
    "15823": "",
    "15824": "",
    "15826": "",
    "15832": "",
    "15834": "",
    "15837": "",
    "15839": "",
    "15872": "",
    "15873": "",
    "15889": "",
    "15900": "",
    "15902": "",
    "15903": "",
    "15904": "",
    "15914": ""
  },
  "source": "meta"
}