{
  "id": 10120,
  "title": "Beating the benchmark",
  "url": "/competitions/avito-prohibited-content/discussion/10120",
  "author_name": "",
  "post_date": "2014-08-26T20:26:20.640Z",
  "votes": 25,
  "comment_count": 35,
  "views": 11951,
  "content": "<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>",
  "messages": [
    {
      "id": "52477",
      "postDate": "08/26/2014 20:26:20",
      "content": "<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52478",
      "postDate": "08/26/2014 21:09:43",
      "content": "<p>You stole my copyrighted topic name :P lol</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52479",
      "postDate": "08/26/2014 21:49:43",
      "content": "<p>[quote=Abhishek;52478]</p>\n<p>You stole my copyrighted topic name :P lol</p>\n<p>[/quote]</p>\n<p>Man, you compete too much, your memory is failing :P</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52480",
      "postDate": "08/26/2014 22:20:47",
      "content": "<p>[quote=Abhishek;52478]</p>\n<p>You stole my copyrighted topic name :P lol</p>\n<p>[/quote]</p>\n<p>No, your copyrighted topic name is &quot;Beating the benchmark :-)&quot;</p>\n<p>;-)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52483",
      "postDate": "08/26/2014 23:49:24",
      "content": "<p>[quote=Foxtrot;52477]</p>\n<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>\n<p>[/quote]</p>\n<p>Additional friendly advice:&nbsp;splitting and training for subcategories might&nbsp;produce a better score (by merging the results). The trouble is that some subcategories don't have enough training examples.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52512",
      "postDate": "08/27/2014 16:21:59",
      "content": "<p>[quote=Foxtrot;52477]</p>\n<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>\n<p>[/quote]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52513",
      "postDate": "08/27/2014 16:26:34",
      "content": "<p>[quote=Momchil Georgiev;52512]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>\n<p>[/quote]</p>\n<p>Vowpal Wabbit needs 1/-1 labels for&nbsp;binary classification, otherwise you get an error.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52514",
      "postDate": "08/27/2014 16:27:16",
      "content": "<p>Thats a very high benchmark! &nbsp;:(</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52515",
      "postDate": "08/27/2014 16:28:30",
      "content": "<p>[quote=Momchil Georgiev;52512]</p>\n<p>[quote=Foxtrot;52477]</p>\n<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>\n<p>[/quote]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>\n<p>[/quote]</p>\n<p>Logistic regression (and hinge loss) needs labels to be [-1,1] for binary classification tasks. So it is aVW convention.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52516",
      "postDate": "08/27/2014 16:46:51",
      "content": "<p>[quote=Foxtrot;52513]</p>\n<p>[quote=Momchil Georgiev;52512]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>\n<p>[/quote]</p>\n<p>Vowpal Wabbit needs 1/-1 labels for&nbsp;binary classification, otherwise you get an error.</p>\n<p>[/quote]</p>\n<p>Thanks! I'm very new to VW but it looks like an awesome tool so I'm trying to learn it. What about the -holdout_off parameter? On my version of VW it complained that it was not a valid flag.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52517",
      "postDate": "08/27/2014 17:03:50",
      "content": "<p>[quote=Momchil Georgiev;52516]</p>\n<p>Thanks! I'm very new to VW but it looks like an awesome tool so I'm trying to learn it. What about the -holdout_off parameter? On my version of VW it complained that it was not a valid flag.</p>\n<p>[/quote]</p>\n<p>This option was introduced recently. When doing multiple passes over data, VW reserves 10% for validation - that's a holdout set. The idea is to turn it off to use all available examples for training. However in case of this competition the difference in the score is minor.</p>\n<p>P.S. Moar here:&nbsp;http://fastml.com/vowpal-wabbit-eats-big-data-from-the-criteo-competition-for-breakfast/</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52529",
      "postDate": "08/27/2014 18:40:57",
      "content": "<p>Thanks for sharing.</p>\n<p>I would love to learn about VW and tried running your code, but it got stuck at predicting stage. When I ran&nbsp;<strong><em>vw -t -i model -d test.vw -p predicshuns.txt</em></strong>, it only shows following logs but nothing more:</p>\n<p><code>For more information use: vw --help<br>Num weight bits = 18<br>learning rate = 0.5<br>initial_t = 0<br>power_t = 0.5<br>using no cache<br>Reading datafile = <br>num sources = 1<br>average since example example current current current<br>loss last counter weight label predict features</code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52563",
      "postDate": "08/28/2014 12:14:27",
      "content": "<p>Vowpal is just amazing. The more I use it, the more impressed I get. Online learning is in a different class of its own. @Foxtrot, thanks for sharing your insights and code examples, it is very helpful in understanding how VW works.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52567",
      "postDate": "08/28/2014 12:49:39",
      "content": "<p>@xbsd You're welcome.</p>\n<p>@Apophenia Check if you have the files (model, test.vw) in place.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52581",
      "postDate": "08/28/2014 14:28:53",
      "content": "<p>Question @Foxtrot, just wondering what is the purpose of not using holdout_off in the final training. I believe this is due to the fact that we want to use the entire training set for the final training and for the initial run (where we do not specify a -f model) we use that to measure the average loss only before we do the final training.</p>\n\n<p>Since in the&nbsp;case where we do not specify a -f model or use -holdout_off&nbsp;VW is already measuring the performance&nbsp;using the holdout set, is there a need for a separate cross-validation (like in R/Python where it is more batch learning) ? Thanks.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52585",
      "postDate": "08/28/2014 15:19:29",
      "content": "<p>@Foxtrot Yes, I have them all in place.</p>\n<p><code>kaggle-avito-master/<br>&#9500;&#9472;&#9472; LICENSE<br>&#9500;&#9472;&#9472; README.md<br>&#9500;&#9472;&#9472; load_attribs.py<br>&#9500;&#9472;&#9472; model<br>&#9500;&#9472;&#9472; predict.py<br>&#9500;&#9472;&#9472; score.py<br>&#9500;&#9472;&#9472; test.vw<br>&#9500;&#9472;&#9472; train.vw<br>&#9500;&#9472;&#9472; train.vw.cache<br>&#9492;&#9472;&#9472; tsv2vw.py</code></p>\n<p><code>0 directories, 10 files</code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52595",
      "postDate": "08/28/2014 17:18:15",
      "content": "<p>@xbsd The purpose of the initial run is mainly to find the optimal number of passes, and yes, the error. There is no need for manual validation, unless you want to do it differently (for example, use 20% for validation or perform cross-validation).</p>\n<p>@Apophenia Then I don't know, maybe you have some old version of VW. Also the printout indicates -b 18 (default), this may mean VW doesn't read the model if you have specified more bits for training.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52599",
      "postDate": "08/28/2014 19:48:05",
      "content": "<p>Thanks for your reply.</p>\n<p>I'm using version 7.4. And I tried training using default number of bits but still had the same problem.</p>\n<p>-----problem resolved-----</p>\n<p>It seems that I didn't build vw correctly. It worked after I reinstall vw using Homebrew. So, for OSX users, install vw by running&nbsp;<em><strong>brew install vowpal-wabbit</strong></em> instead of building it by yourself.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52610",
      "postDate": "08/29/2014 04:14:40",
      "content": "<p>@Foxtrot,</p>\n<p>The passes arg is tuned w.r.t the log-loss. Say I want to tune it w.r.t to the true evaluation metric, i.e., AP@k, what approach would you recommend?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52630",
      "postDate": "08/29/2014 12:57:36",
      "content": "<p>@yr Good point. I'd say log-loss is a pretty good proxy. You could try using quantile loss, specifically for ranking, it gave me similiar, slightly worse, results.&nbsp;Or a more involved approach: train for one pass, validate, resume training. Again, see this:</p>\n<p>http://fastml.com/vowpal-wabbit-eats-big-data-from-the-criteo-competition-for-breakfast/</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52631",
      "postDate": "08/29/2014 13:57:55",
      "content": "<p>[quote=Apophenia;52599]</p>\n<p>Thanks for your reply.</p>\n<p>I'm using version 7.4. And I tried training using default number of bits but still had the same problem.</p>\n<p>-----problem resolved-----</p>\n<p>It seems that I didn't build vw correctly. It worked after I reinstall vw using Homebrew. So, for OSX users, install vw by running&nbsp;<em><strong>brew install vowpal-wabbit</strong></em> instead of building it by yourself.</p>\n<p>[/quote]</p>\n<p>Hmm. &nbsp;VW builds fine on OSX for me. &nbsp;You just git clone'd and then ran make and make install, correct?</p>\n\n<p>git clone git://github.com/JohnLangford/vowpal_wabbit.git</p>\n<p>cd vowpal_wabbit</p>\n<p>./autogen.sh</p>\n<p>make</p>\n<p>make install</p>\n\n<p>Should do the trick. &nbsp;You do need to have Xcode+command line tools already.</p>\n<p>Brew installs are fine, too, it's just not as easy to pull in fixes&nbsp;and the latest updates.</p>\n\n<p><em>Edited to add the tip from xbsd...</em></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52636",
      "postDate": "08/29/2014 15:23:18",
      "content": "<p>[quote=Phil Culliton;52631]</p>\n<p>[quote=Apophenia;52599]</p>\n<p>Thanks for your reply.</p>\n<p>I'm using version 7.4. And I tried training using default number of bits but still had the same problem.</p>\n<p>-----problem resolved-----</p>\n<p>It seems that I didn't build vw correctly. It worked after I reinstall vw using Homebrew. So, for OSX users, install vw by running&nbsp;<em><strong>brew install vowpal-wabbit</strong></em> instead of building it by yourself.</p>\n<p>[/quote]</p>\n<p>Hmm. &nbsp;VW builds fine on OSX for me. &nbsp;You just git clone'd and then ran make and make install, correct?</p>\n<p>git clone git://github.com/JohnLangford/vowpal_wabbit.git</p>\n<p>cd vowpal_wabbit</p>\n<p>make</p>\n<p>make install</p>\n<p>Should do the trick. &nbsp;You do need to have Xcode+command line tools already.</p>\n<p>Brew installs are fine, too, it's just not as easy to pull in fixes&nbsp;and the latest updates.</p>\n<p>[/quote]</p>\n<p>Thanks. I tried this first, but some dependencies required by vw were not correctly installed so that vw failed(or falsely succeeded) to build.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52637",
      "postDate": "08/29/2014 15:28:58",
      "content": "<p>git clone</p>\n<p><strong>Run ./autogen.sh</strong></p>\n<p>Then run&nbsp;make; make install</p>\n<p>You will need Boost if it is not already there but autogen should give some indication</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52638",
      "postDate": "08/29/2014 15:40:44",
      "content": "<p>Thanks! &nbsp;Forgot I did that initially.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52646",
      "postDate": "08/29/2014 18:05:12",
      "content": "<p>It would be great if you could wait the end of the competition before giving a solution that gives results way above the benchmark. It's kind of annoying to see the LB spoiled.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52686",
      "postDate": "08/30/2014 11:23:54",
      "content": "<p>@Pourquoipas I can see your point but I view the matter differently. I profoundly enjoy &quot;beating the benchmark&quot; threads, whether I'm the author or someone posts a solution better than mine. And after the contest it's time for the winners to show their hand (if they choose to do so).</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52725",
      "postDate": "08/30/2014 23:06:11",
      "content": "<p>Hi &nbsp;friends,</p>\n<p>When I ran the given code (without any change) to&nbsp;transfer tsv file to vw file, I came across the following syntax error.&nbsp;Any ideas? Thanks in advance!</p>\n<p>$ python tsv2vw.py train.tsv train.vw<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>100000<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>200000<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>300000<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>Traceback (most recent call last):<br> File &quot;tsv2vw.py&quot;, line 20, in &lt;module&gt;<br> new_line = construct_line( line )<br> File &quot;/home/Shize/vowpal_wabbit/vowpalwabbit/vw/construct_line.py&quot;, line 54, in construct_line<br> attrs = eval( line['attrs'] )<br> File &quot;&lt;string&gt;&quot;, line 1<br> {&quot;&#1058;&#1080;&#1087; &#1086;&#1073;&#1098;&#1103;&#1074;&#1083;&#1077;&#1085;&#1080;&#1103;&quot;:&quot;&#1057;&#1076;&#1072;&#1084;&quot;, &quot;&#1050;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086; &#1082;&#1086;&#1084;&#1085;&#1072;&#1090;&quot;:&quot;2&quot;, &quot;&#1057;&#1088;&#1086;&#1082; &#1072;&#1088;&#1077;&#1085;&#1076;&#1099;&quot;:&quot;&#1053;&#1072; &#1076;&#1083;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1081; &#1089;&#1088;&#1086;&#1082;&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&quot;:&quot;&#1053;&#1077; &#1087;&#1077;&#1088;&#1074;&#1099;&#1081; &#1080; &#1085;&#1077; &#1087;&#1086;&#1089;&#1083;&#1077;&#1076;&#1085;&#1080;&#1081;&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&quot;:&quot;7&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&#1077;&#1081; &#1074; &#1076;&#1086;&#1084;&#1077;&quot;:&quot;9-12&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&#1077;&#1081; &#1074; &#1076;&#1086;&#1084;&#1077;&quot;:&quot;10&quot;, &quot;&#1058;&#1080;&#1087; &#1076;&#1086;&#1084;&#1072;&quot;:&quot;&#1050;&#1080;&#1088;&#1087;&#1080;&#1095;&#1085;&#1099;&#1081;&quot;, &quot;&#1040;&#1076;&#1088;&#1077;&#1089;&quot;:&quot;&#1091;&#1083;.10-&#1081; &#1087;&#1103;&#1090;&#1080;&#1083;&#1077;&#1090;&#1082;&#1080;,64 (&#1084;/&#1085; /&quot;&#1058;&#1091;&#1088;&#1080;&#1089;&#1090;/&quot; /&quot;}</p>\n<p>^<br>SyntaxError: invalid syntax</p>\n<p>P.S.:&nbsp;running this command indeed output a vw file in correct form, but with much smaller size (with only about&nbsp;300,000 examples)</p>\n<p>Best wishes,</p>\n<p>Shize</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52726",
      "postDate": "08/31/2014 01:24:15",
      "content": "<p>Yes, you have to hand-edit some of the attrs. For eg, &quot;&quot;name&quot;&quot;:&quot;&quot;some text /&quot;&quot;some escaped text/&quot;&quot;&quot;&quot; ...will become&nbsp;&quot;&quot;name&quot;&quot;:&quot;&quot;some text some escaped text&quot;&quot; ... basically remove the occurrences of /&quot;&quot; or /&quot; within the value of the key-value pair. Alternatively, you could write some regex, but hand-editing the file incrementally was faster.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52742",
      "postDate": "08/31/2014 10:06:32",
      "content": "<p>[quote=Foxtrot;52686]</p>\n<p>@Pourquoipas I can see your point but I view the matter differently. I profoundly enjoy &quot;beating the benchmark&quot; threads, whether I'm the author or someone posts a solution better than mine. And after the contest it's time for the winners to show their hand (if they choose to do so).</p>\n<p>[/quote]</p>\n<p>I also like beating the benchmark threads when posted at the begining of the competition. It's a good way to start. However, when posted at the end, it can penalize people who've worked on the competition for a long time.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52746",
      "postDate": "08/31/2014 12:32:15",
      "content": "<p>&quot;json.loads() failed, trying eval()...&quot; is actually output from the script, just for information. Don't know about the syntax error at the end!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52748",
      "postDate": "08/31/2014 13:41:24",
      "content": "<p>--passes in vw</p>\n<p>The more the better.<br>Is it right?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52752",
      "postDate": "08/31/2014 14:25:21",
      "content": "<p>no if you want to avoid overfitting.</p>\n<p>there is an early-stopping (relatively new feature) but I'm not sure exactly how it works.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52754",
      "postDate": "08/31/2014 15:03:33",
      "content": "<p>Hm... I can't overfit in my local tests...</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52755",
      "postDate": "08/31/2014 15:13:49",
      "content": "<p>[quote=Alexander D'yakonov;52748]</p>\n<p>--passes in vw</p>\n<p>The more the better.<br>Is it right?</p>\n<p>[/quote]</p>\n<p>[quote=clustifier;52752]</p>\n<p>no if you want to avoid overfitting.</p>\n<p>[/quote]</p>\n<p>It depends.</p>\n<p>Like other SG-methods, with high learning rate and\\or weak regularization its possible to overfit. With small learning rate and\\or strong regularization - more is better.</p>\n\n<p>Is it right? =)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52854",
      "postDate": "09/01/2014 14:38:48",
      "content": "<p>@clustifier I have written about early stopping earlier in this thread, look for &quot;holdout&quot;.</p>\n<p>@Alexander Here's how to overfit:</p>\n<p><code>$ vw -b 29 --loss_function logistic -c -P 1e6 train.vw --passes 30 --holdout_off</code></p>\n<p><code>...</code></p>\n<p><code>0.020554 0.014088 110000000 110000000.0 -1.0000 -16.3854 132<br>0.020494 0.013932 111000000 111000000.0 -1.0000 -16.0693 46<br>0.020437 0.014074 112000000 112000000.0 -1.0000 -6.4644 19<br>0.020377 0.013637 113000000 113000000.0 -1.0000 -5.1424 9<br>0.020320 0.013909 114000000 114000000.0 -1.0000 -8.8841 39<br>0.020263 0.013750 115000000 115000000.0 -1.0000 -12.8807 27<br>0.020208 0.013882 116000000 116000000.0 -1.0000 -3.4141 26<br>0.020150 0.013475 117000000 117000000.0 -1.0000 -22.4390 31<br>0.020096 0.013758 118000000 118000000.0 -1.0000 -23.9844 187<br>0.020041 0.013557 119000000 119000000.0 -1.0000 -6.8467 17</code><code></code></p>\n<p><code>finished run<br>number of examples per pass = 3995804<br>passes used = 30<br>weighted example sum = 1.19874e+08<br>weighted label sum = -1.03374e+08<br>average loss = 0.0199952<br>best constant = -0.862358<br>total feature number = 6113723760<br><br></code></p>\n<p>With early stopping the holdout score won't get beneath 0.03.</p>\n<p>@Mikhail I'm not sure how learning rate relates to overfitting... I'd imagine a smaller learning rate would make overfitting easier in the end.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52863",
      "postDate": "09/01/2014 16:26:41",
      "content": "<p>I don't know if neural network reduction is better now, or if it always worked this great, anyway, a lot of gain was found in the --nn parameter. Maybe not surprising since the inspiration to add it to VW was to win some Kaggle competitions with VW.&nbsp;http://www.machinedlearnings.com/2013/02/one-louder.html&nbsp;http://www.machinedlearnings.com/2012/11/unpimp-your-sigmoid.html</p>\n<p>Also: Namespacing features did not help, but hamper our score.&nbsp;We did not treat the dataset with much respect: One bag of features, trying to encode non-text tokens as floats, and encoding all tokens as categorical: year:2009 year_2009:1 category_cars etc.</p>\n<p>using ngrams or nskips then almost becomes a lightweight version of -q quadratic features. With the right regularization and high enough bitsize, I think VW could even handle those (perhaps cubic is a step too far).</p>\n<p>As for learning rate and overfitting: I think after so many passes the learning rate is so low, so a few extra passes do not matter much for adjusting feature weights (and hence overfit). With older versions of VW I ran 300 passes for a slight increase in the leaderboards. I thought hold_out was more to get a realistic score of average loss (not a skewed value approaching 0). Using bootstrap and nn functionality&nbsp;seems to do well with fewer or even single passes.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 52478,
      "author_name": "abhishek",
      "author_url": "",
      "post_date": "08/26/2014 21:09:43",
      "content": "<p>You stole my copyrighted topic name :P lol</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52479,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/26/2014 21:49:43",
      "content": "<p>[quote=Abhishek;52478]</p>\n<p>You stole my copyrighted topic name :P lol</p>\n<p>[/quote]</p>\n<p>Man, you compete too much, your memory is failing :P</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52480,
      "author_name": "adjgiulio",
      "author_url": "",
      "post_date": "08/26/2014 22:20:47",
      "content": "<p>[quote=Abhishek;52478]</p>\n<p>You stole my copyrighted topic name :P lol</p>\n<p>[/quote]</p>\n<p>No, your copyrighted topic name is &quot;Beating the benchmark :-)&quot;</p>\n<p>;-)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52483,
      "author_name": "snisioi",
      "author_url": "",
      "post_date": "08/26/2014 23:49:24",
      "content": "<p>[quote=Foxtrot;52477]</p>\n<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>\n<p>[/quote]</p>\n<p>Additional friendly advice:&nbsp;splitting and training for subcategories might&nbsp;produce a better score (by merging the results). The trouble is that some subcategories don't have enough training examples.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52512,
      "author_name": "sirguessalot",
      "author_url": "",
      "post_date": "08/27/2014 16:21:59",
      "content": "<p>[quote=Foxtrot;52477]</p>\n<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>\n<p>[/quote]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52513,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/27/2014 16:26:34",
      "content": "<p>[quote=Momchil Georgiev;52512]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>\n<p>[/quote]</p>\n<p>Vowpal Wabbit needs 1/-1 labels for&nbsp;binary classification, otherwise you get an error.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52514,
      "author_name": "abhishek",
      "author_url": "",
      "post_date": "08/27/2014 16:27:16",
      "content": "<p>Thats a very high benchmark! &nbsp;:(</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52515,
      "author_name": "triskelion",
      "author_url": "",
      "post_date": "08/27/2014 16:28:30",
      "content": "<p>[quote=Momchil Georgiev;52512]</p>\n<p>[quote=Foxtrot;52477]</p>\n<p>Good news, everyone! Here's the code that got me ~0.971:</p>\n<p>https://github.com/zygmuntz/kaggle-avito</p>\n<p>It uses Vowpal Wabbit and comes with instructions. Remember to click <strong>thanks</strong> if you find it interesting or useful.</p>\n<p>[/quote]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>\n<p>[/quote]</p>\n<p>Logistic regression (and hinge loss) needs labels to be [-1,1] for binary classification tasks. So it is aVW convention.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52516,
      "author_name": "sirguessalot",
      "author_url": "",
      "post_date": "08/27/2014 16:46:51",
      "content": "<p>[quote=Foxtrot;52513]</p>\n<p>[quote=Momchil Georgiev;52512]</p>\n<p>Hi Zygmunt, can you explain the logic behind setting label to -1 when it's 0 in the train data? Is this is a VW convention or a choice you made?</p>\n<p>[/quote]</p>\n<p>Vowpal Wabbit needs 1/-1 labels for&nbsp;binary classification, otherwise you get an error.</p>\n<p>[/quote]</p>\n<p>Thanks! I'm very new to VW but it looks like an awesome tool so I'm trying to learn it. What about the -holdout_off parameter? On my version of VW it complained that it was not a valid flag.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52517,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/27/2014 17:03:50",
      "content": "<p>[quote=Momchil Georgiev;52516]</p>\n<p>Thanks! I'm very new to VW but it looks like an awesome tool so I'm trying to learn it. What about the -holdout_off parameter? On my version of VW it complained that it was not a valid flag.</p>\n<p>[/quote]</p>\n<p>This option was introduced recently. When doing multiple passes over data, VW reserves 10% for validation - that's a holdout set. The idea is to turn it off to use all available examples for training. However in case of this competition the difference in the score is minor.</p>\n<p>P.S. Moar here:&nbsp;http://fastml.com/vowpal-wabbit-eats-big-data-from-the-criteo-competition-for-breakfast/</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52529,
      "author_name": "apophenia",
      "author_url": "",
      "post_date": "08/27/2014 18:40:57",
      "content": "<p>Thanks for sharing.</p>\n<p>I would love to learn about VW and tried running your code, but it got stuck at predicting stage. When I ran&nbsp;<strong><em>vw -t -i model -d test.vw -p predicshuns.txt</em></strong>, it only shows following logs but nothing more:</p>\n<p><code>For more information use: vw --help<br>Num weight bits = 18<br>learning rate = 0.5<br>initial_t = 0<br>power_t = 0.5<br>using no cache<br>Reading datafile = <br>num sources = 1<br>average since example example current current current<br>loss last counter weight label predict features</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52563,
      "author_name": "dasgupta",
      "author_url": "",
      "post_date": "08/28/2014 12:14:27",
      "content": "<p>Vowpal is just amazing. The more I use it, the more impressed I get. Online learning is in a different class of its own. @Foxtrot, thanks for sharing your insights and code examples, it is very helpful in understanding how VW works.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52567,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/28/2014 12:49:39",
      "content": "<p>@xbsd You're welcome.</p>\n<p>@Apophenia Check if you have the files (model, test.vw) in place.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52581,
      "author_name": "dasgupta",
      "author_url": "",
      "post_date": "08/28/2014 14:28:53",
      "content": "<p>Question @Foxtrot, just wondering what is the purpose of not using holdout_off in the final training. I believe this is due to the fact that we want to use the entire training set for the final training and for the initial run (where we do not specify a -f model) we use that to measure the average loss only before we do the final training.</p>\n\n<p>Since in the&nbsp;case where we do not specify a -f model or use -holdout_off&nbsp;VW is already measuring the performance&nbsp;using the holdout set, is there a need for a separate cross-validation (like in R/Python where it is more batch learning) ? Thanks.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52585,
      "author_name": "apophenia",
      "author_url": "",
      "post_date": "08/28/2014 15:19:29",
      "content": "<p>@Foxtrot Yes, I have them all in place.</p>\n<p><code>kaggle-avito-master/<br>&#9500;&#9472;&#9472; LICENSE<br>&#9500;&#9472;&#9472; README.md<br>&#9500;&#9472;&#9472; load_attribs.py<br>&#9500;&#9472;&#9472; model<br>&#9500;&#9472;&#9472; predict.py<br>&#9500;&#9472;&#9472; score.py<br>&#9500;&#9472;&#9472; test.vw<br>&#9500;&#9472;&#9472; train.vw<br>&#9500;&#9472;&#9472; train.vw.cache<br>&#9492;&#9472;&#9472; tsv2vw.py</code></p>\n<p><code>0 directories, 10 files</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52595,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/28/2014 17:18:15",
      "content": "<p>@xbsd The purpose of the initial run is mainly to find the optimal number of passes, and yes, the error. There is no need for manual validation, unless you want to do it differently (for example, use 20% for validation or perform cross-validation).</p>\n<p>@Apophenia Then I don't know, maybe you have some old version of VW. Also the printout indicates -b 18 (default), this may mean VW doesn't read the model if you have specified more bits for training.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52599,
      "author_name": "apophenia",
      "author_url": "",
      "post_date": "08/28/2014 19:48:05",
      "content": "<p>Thanks for your reply.</p>\n<p>I'm using version 7.4. And I tried training using default number of bits but still had the same problem.</p>\n<p>-----problem resolved-----</p>\n<p>It seems that I didn't build vw correctly. It worked after I reinstall vw using Homebrew. So, for OSX users, install vw by running&nbsp;<em><strong>brew install vowpal-wabbit</strong></em> instead of building it by yourself.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52610,
      "author_name": "chenglongchen",
      "author_url": "",
      "post_date": "08/29/2014 04:14:40",
      "content": "<p>@Foxtrot,</p>\n<p>The passes arg is tuned w.r.t the log-loss. Say I want to tune it w.r.t to the true evaluation metric, i.e., AP@k, what approach would you recommend?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52630,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/29/2014 12:57:36",
      "content": "<p>@yr Good point. I'd say log-loss is a pretty good proxy. You could try using quantile loss, specifically for ranking, it gave me similiar, slightly worse, results.&nbsp;Or a more involved approach: train for one pass, validate, resume training. Again, see this:</p>\n<p>http://fastml.com/vowpal-wabbit-eats-big-data-from-the-criteo-competition-for-breakfast/</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52631,
      "author_name": "philculliton",
      "author_url": "",
      "post_date": "08/29/2014 13:57:55",
      "content": "<p>[quote=Apophenia;52599]</p>\n<p>Thanks for your reply.</p>\n<p>I'm using version 7.4. And I tried training using default number of bits but still had the same problem.</p>\n<p>-----problem resolved-----</p>\n<p>It seems that I didn't build vw correctly. It worked after I reinstall vw using Homebrew. So, for OSX users, install vw by running&nbsp;<em><strong>brew install vowpal-wabbit</strong></em> instead of building it by yourself.</p>\n<p>[/quote]</p>\n<p>Hmm. &nbsp;VW builds fine on OSX for me. &nbsp;You just git clone'd and then ran make and make install, correct?</p>\n\n<p>git clone git://github.com/JohnLangford/vowpal_wabbit.git</p>\n<p>cd vowpal_wabbit</p>\n<p>./autogen.sh</p>\n<p>make</p>\n<p>make install</p>\n\n<p>Should do the trick. &nbsp;You do need to have Xcode+command line tools already.</p>\n<p>Brew installs are fine, too, it's just not as easy to pull in fixes&nbsp;and the latest updates.</p>\n\n<p><em>Edited to add the tip from xbsd...</em></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52636,
      "author_name": "apophenia",
      "author_url": "",
      "post_date": "08/29/2014 15:23:18",
      "content": "<p>[quote=Phil Culliton;52631]</p>\n<p>[quote=Apophenia;52599]</p>\n<p>Thanks for your reply.</p>\n<p>I'm using version 7.4. And I tried training using default number of bits but still had the same problem.</p>\n<p>-----problem resolved-----</p>\n<p>It seems that I didn't build vw correctly. It worked after I reinstall vw using Homebrew. So, for OSX users, install vw by running&nbsp;<em><strong>brew install vowpal-wabbit</strong></em> instead of building it by yourself.</p>\n<p>[/quote]</p>\n<p>Hmm. &nbsp;VW builds fine on OSX for me. &nbsp;You just git clone'd and then ran make and make install, correct?</p>\n<p>git clone git://github.com/JohnLangford/vowpal_wabbit.git</p>\n<p>cd vowpal_wabbit</p>\n<p>make</p>\n<p>make install</p>\n<p>Should do the trick. &nbsp;You do need to have Xcode+command line tools already.</p>\n<p>Brew installs are fine, too, it's just not as easy to pull in fixes&nbsp;and the latest updates.</p>\n<p>[/quote]</p>\n<p>Thanks. I tried this first, but some dependencies required by vw were not correctly installed so that vw failed(or falsely succeeded) to build.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52637,
      "author_name": "dasgupta",
      "author_url": "",
      "post_date": "08/29/2014 15:28:58",
      "content": "<p>git clone</p>\n<p><strong>Run ./autogen.sh</strong></p>\n<p>Then run&nbsp;make; make install</p>\n<p>You will need Boost if it is not already there but autogen should give some indication</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52638,
      "author_name": "philculliton",
      "author_url": "",
      "post_date": "08/29/2014 15:40:44",
      "content": "<p>Thanks! &nbsp;Forgot I did that initially.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52646,
      "author_name": "coucouv",
      "author_url": "",
      "post_date": "08/29/2014 18:05:12",
      "content": "<p>It would be great if you could wait the end of the competition before giving a solution that gives results way above the benchmark. It's kind of annoying to see the LB spoiled.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52686,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/30/2014 11:23:54",
      "content": "<p>@Pourquoipas I can see your point but I view the matter differently. I profoundly enjoy &quot;beating the benchmark&quot; threads, whether I'm the author or someone posts a solution better than mine. And after the contest it's time for the winners to show their hand (if they choose to do so).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52725,
      "author_name": "sushize",
      "author_url": "",
      "post_date": "08/30/2014 23:06:11",
      "content": "<p>Hi &nbsp;friends,</p>\n<p>When I ran the given code (without any change) to&nbsp;transfer tsv file to vw file, I came across the following syntax error.&nbsp;Any ideas? Thanks in advance!</p>\n<p>$ python tsv2vw.py train.tsv train.vw<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>100000<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>200000<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>300000<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>json.loads() failed, trying eval()...<br>Traceback (most recent call last):<br> File &quot;tsv2vw.py&quot;, line 20, in &lt;module&gt;<br> new_line = construct_line( line )<br> File &quot;/home/Shize/vowpal_wabbit/vowpalwabbit/vw/construct_line.py&quot;, line 54, in construct_line<br> attrs = eval( line['attrs'] )<br> File &quot;&lt;string&gt;&quot;, line 1<br> {&quot;&#1058;&#1080;&#1087; &#1086;&#1073;&#1098;&#1103;&#1074;&#1083;&#1077;&#1085;&#1080;&#1103;&quot;:&quot;&#1057;&#1076;&#1072;&#1084;&quot;, &quot;&#1050;&#1086;&#1083;&#1080;&#1095;&#1077;&#1089;&#1090;&#1074;&#1086; &#1082;&#1086;&#1084;&#1085;&#1072;&#1090;&quot;:&quot;2&quot;, &quot;&#1057;&#1088;&#1086;&#1082; &#1072;&#1088;&#1077;&#1085;&#1076;&#1099;&quot;:&quot;&#1053;&#1072; &#1076;&#1083;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1081; &#1089;&#1088;&#1086;&#1082;&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&quot;:&quot;&#1053;&#1077; &#1087;&#1077;&#1088;&#1074;&#1099;&#1081; &#1080; &#1085;&#1077; &#1087;&#1086;&#1089;&#1083;&#1077;&#1076;&#1085;&#1080;&#1081;&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&quot;:&quot;7&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&#1077;&#1081; &#1074; &#1076;&#1086;&#1084;&#1077;&quot;:&quot;9-12&quot;, &quot;&#1069;&#1090;&#1072;&#1078;&#1077;&#1081; &#1074; &#1076;&#1086;&#1084;&#1077;&quot;:&quot;10&quot;, &quot;&#1058;&#1080;&#1087; &#1076;&#1086;&#1084;&#1072;&quot;:&quot;&#1050;&#1080;&#1088;&#1087;&#1080;&#1095;&#1085;&#1099;&#1081;&quot;, &quot;&#1040;&#1076;&#1088;&#1077;&#1089;&quot;:&quot;&#1091;&#1083;.10-&#1081; &#1087;&#1103;&#1090;&#1080;&#1083;&#1077;&#1090;&#1082;&#1080;,64 (&#1084;/&#1085; /&quot;&#1058;&#1091;&#1088;&#1080;&#1089;&#1090;/&quot; /&quot;}</p>\n<p>^<br>SyntaxError: invalid syntax</p>\n<p>P.S.:&nbsp;running this command indeed output a vw file in correct form, but with much smaller size (with only about&nbsp;300,000 examples)</p>\n<p>Best wishes,</p>\n<p>Shize</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52726,
      "author_name": "dasgupta",
      "author_url": "",
      "post_date": "08/31/2014 01:24:15",
      "content": "<p>Yes, you have to hand-edit some of the attrs. For eg, &quot;&quot;name&quot;&quot;:&quot;&quot;some text /&quot;&quot;some escaped text/&quot;&quot;&quot;&quot; ...will become&nbsp;&quot;&quot;name&quot;&quot;:&quot;&quot;some text some escaped text&quot;&quot; ... basically remove the occurrences of /&quot;&quot; or /&quot; within the value of the key-value pair. Alternatively, you could write some regex, but hand-editing the file incrementally was faster.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52742,
      "author_name": "coucouv",
      "author_url": "",
      "post_date": "08/31/2014 10:06:32",
      "content": "<p>[quote=Foxtrot;52686]</p>\n<p>@Pourquoipas I can see your point but I view the matter differently. I profoundly enjoy &quot;beating the benchmark&quot; threads, whether I'm the author or someone posts a solution better than mine. And after the contest it's time for the winners to show their hand (if they choose to do so).</p>\n<p>[/quote]</p>\n<p>I also like beating the benchmark threads when posted at the begining of the competition. It's a good way to start. However, when posted at the end, it can penalize people who've worked on the competition for a long time.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52746,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "08/31/2014 12:32:15",
      "content": "<p>&quot;json.loads() failed, trying eval()...&quot; is actually output from the script, just for information. Don't know about the syntax error at the end!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52748,
      "author_name": "dyakonov",
      "author_url": "",
      "post_date": "08/31/2014 13:41:24",
      "content": "<p>--passes in vw</p>\n<p>The more the better.<br>Is it right?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52752,
      "author_name": "clustifier",
      "author_url": "",
      "post_date": "08/31/2014 14:25:21",
      "content": "<p>no if you want to avoid overfitting.</p>\n<p>there is an early-stopping (relatively new feature) but I'm not sure exactly how it works.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52754,
      "author_name": "dyakonov",
      "author_url": "",
      "post_date": "08/31/2014 15:03:33",
      "content": "<p>Hm... I can't overfit in my local tests...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52755,
      "author_name": "mikhailtrofimov",
      "author_url": "",
      "post_date": "08/31/2014 15:13:49",
      "content": "<p>[quote=Alexander D'yakonov;52748]</p>\n<p>--passes in vw</p>\n<p>The more the better.<br>Is it right?</p>\n<p>[/quote]</p>\n<p>[quote=clustifier;52752]</p>\n<p>no if you want to avoid overfitting.</p>\n<p>[/quote]</p>\n<p>It depends.</p>\n<p>Like other SG-methods, with high learning rate and\\or weak regularization its possible to overfit. With small learning rate and\\or strong regularization - more is better.</p>\n\n<p>Is it right? =)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52854,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "09/01/2014 14:38:48",
      "content": "<p>@clustifier I have written about early stopping earlier in this thread, look for &quot;holdout&quot;.</p>\n<p>@Alexander Here's how to overfit:</p>\n<p><code>$ vw -b 29 --loss_function logistic -c -P 1e6 train.vw --passes 30 --holdout_off</code></p>\n<p><code>...</code></p>\n<p><code>0.020554 0.014088 110000000 110000000.0 -1.0000 -16.3854 132<br>0.020494 0.013932 111000000 111000000.0 -1.0000 -16.0693 46<br>0.020437 0.014074 112000000 112000000.0 -1.0000 -6.4644 19<br>0.020377 0.013637 113000000 113000000.0 -1.0000 -5.1424 9<br>0.020320 0.013909 114000000 114000000.0 -1.0000 -8.8841 39<br>0.020263 0.013750 115000000 115000000.0 -1.0000 -12.8807 27<br>0.020208 0.013882 116000000 116000000.0 -1.0000 -3.4141 26<br>0.020150 0.013475 117000000 117000000.0 -1.0000 -22.4390 31<br>0.020096 0.013758 118000000 118000000.0 -1.0000 -23.9844 187<br>0.020041 0.013557 119000000 119000000.0 -1.0000 -6.8467 17</code><code></code></p>\n<p><code>finished run<br>number of examples per pass = 3995804<br>passes used = 30<br>weighted example sum = 1.19874e+08<br>weighted label sum = -1.03374e+08<br>average loss = 0.0199952<br>best constant = -0.862358<br>total feature number = 6113723760<br><br></code></p>\n<p>With early stopping the holdout score won't get beneath 0.03.</p>\n<p>@Mikhail I'm not sure how learning rate relates to overfitting... I'd imagine a smaller learning rate would make overfitting easier in the end.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52863,
      "author_name": "triskelion",
      "author_url": "",
      "post_date": "09/01/2014 16:26:41",
      "content": "<p>I don't know if neural network reduction is better now, or if it always worked this great, anyway, a lot of gain was found in the --nn parameter. Maybe not surprising since the inspiration to add it to VW was to win some Kaggle competitions with VW.&nbsp;http://www.machinedlearnings.com/2013/02/one-louder.html&nbsp;http://www.machinedlearnings.com/2012/11/unpimp-your-sigmoid.html</p>\n<p>Also: Namespacing features did not help, but hamper our score.&nbsp;We did not treat the dataset with much respect: One bag of features, trying to encode non-text tokens as floats, and encoding all tokens as categorical: year:2009 year_2009:1 category_cars etc.</p>\n<p>using ngrams or nskips then almost becomes a lightweight version of -q quadratic features. With the right regularization and high enough bitsize, I think VW could even handle those (perhaps cubic is a step too far).</p>\n<p>As for learning rate and overfitting: I think after so many passes the learning rate is so low, so a few extra passes do not matter much for adjusting feature weights (and hence overfit). With older versions of VW I ran 300 passes for a slight increase in the leaderboards. I thought hold_out was more to get a realistic score of average loss (not a skewed value approaching 0). Using bootstrap and nn functionality&nbsp;seems to do well with fewer or even single passes.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "52477": "",
    "52478": "",
    "52479": "",
    "52480": "",
    "52483": "",
    "52512": "",
    "52513": "",
    "52514": "",
    "52515": "",
    "52516": "",
    "52517": "",
    "52529": "",
    "52563": "",
    "52567": "",
    "52581": "",
    "52585": "",
    "52595": "",
    "52599": "",
    "52610": "",
    "52630": "",
    "52631": "",
    "52636": "",
    "52637": "",
    "52638": "",
    "52646": "",
    "52686": "",
    "52725": "",
    "52726": "",
    "52742": "",
    "52746": "",
    "52748": "",
    "52752": "",
    "52754": "",
    "52755": "",
    "52854": "",
    "52863": ""
  },
  "source": "meta"
}