{
  "id": 902,
  "title": "Benchmark minibatch k-means, step by step",
  "url": "/competitions/SemiSupervisedFeatureLearning/discussion/902",
  "author_name": "",
  "post_date": "2011-09-30T02:18:53.333Z",
  "votes": null,
  "comment_count": 2,
  "views": 4582,
  "content": "<p>I've just posted another benchmark, using the minibatch k-means from sofia-ml. &nbsp;The cluster centers were learned on the combination of the unlabeled dataset and the training data set. &nbsp;This benchmark used larger minibatch sizes and more iterations than the\r\n &quot;example entry benchmark&quot;, and took about 25 minutes to train the cluster centers on a normal laptop rather than about 60 seconds.</p>\r\n<p>Since there had been some questions previously, I thought it might be helpful to give the full set of commands used to produce this benchmark:</p>\r\n<pre># Step 1. &nbsp;Combine the unlabled data set with the training data.</pre>\r\n<pre>cat ../competition_data/unlabeled_data.svmlight.dat  ../competition_data/public_train_data.svmlight.dat &gt; concatenated_data.dat</pre>\r\n<pre>&nbsp;</pre>\r\n<pre># Step 2.  Learn the cluster centers.</pre>\r\n<pre>$HOME/sofia-ml/sofia-kmeans \\<br>  --k 100 \\<br>  --opt_type mini_batch_kmeans \\<br>  --dimensionality 1000001 \\<br>  --training_file concatenated_data.dat \\<br>  --model_out full_kmeans_model.txt \\<br>  --iterations 10000 \\<br>  --mini_batch_size 1000 \\<br>  --objective_after_init \\<br>  --objective_after_training \\<br><br></pre>\r\n<pre># Step 3.  Apply the learned cluster centers to the training data.<br>$HOME/sofia-ml/sofia-kmeans \\<br>  --model_in full_kmeans_model.txt \\<br>  --test_file public_train_data.svmlight.dat \\<br>  --objective_on_test \\<br>  --cluster_mapping_out full_kmeans.train.dat \\<br>  --cluster_mapping_type rbf_kernel \\<br>  --cluster_mapping_param 0.01 \\<br><br># Step 4.  Apply the learned cluster centers to the test data.<br>$HOME/sofia-ml/sofia-kmeans \\<br>  --model_in full_kmeans_model.txt \\<br>  --test_filepublic_test_data.svmlight.dat \\<br>  --objective_on_test \\<br>  --cluster_mapping_out full_kmeans.test.dat \\<br>  --cluster_mapping_type rbf_kernel \\<br>  --cluster_mapping_param 0.01 \\</pre>\r\n&nbsp;\r\n<pre># Step 5.  Create dense CSV format versions of the new data sets.</pre>\r\n<pre>./svmlightToDenseFormat.pl full_kmeans.train.dat &gt; full_kmeans.train.dense.dat</pre>\r\n<pre>./svmlightToDenseFormat.pl full_kmeans.test.dat &gt; full_kmeans.test.dense.dat</pre>\r\n&nbsp;\r\n<pre># Step 6.  Execute the ./runLeaderboardEval.pl script.</pre>\r\n<pre>./runLeaderboardEval.pl full_kmeans.train.dense.dat ../competition_data/public_train.labels.dat full_kmeans.test.dense.dat /Users/dsculley/libsvm-3.1/ test.full_kmeans.out</pre>",
  "messages": [
    {
      "id": "5752",
      "postDate": "09/30/2011 02:18:53",
      "content": "<p>I've just posted another benchmark, using the minibatch k-means from sofia-ml. &nbsp;The cluster centers were learned on the combination of the unlabeled dataset and the training data set. &nbsp;This benchmark used larger minibatch sizes and more iterations than the\r\n &quot;example entry benchmark&quot;, and took about 25 minutes to train the cluster centers on a normal laptop rather than about 60 seconds.</p>\r\n<p>Since there had been some questions previously, I thought it might be helpful to give the full set of commands used to produce this benchmark:</p>\r\n<pre># Step 1. &nbsp;Combine the unlabled data set with the training data.</pre>\r\n<pre>cat ../competition_data/unlabeled_data.svmlight.dat  ../competition_data/public_train_data.svmlight.dat &gt; concatenated_data.dat</pre>\r\n<pre>&nbsp;</pre>\r\n<pre># Step 2.  Learn the cluster centers.</pre>\r\n<pre>$HOME/sofia-ml/sofia-kmeans \\<br>  --k 100 \\<br>  --opt_type mini_batch_kmeans \\<br>  --dimensionality 1000001 \\<br>  --training_file concatenated_data.dat \\<br>  --model_out full_kmeans_model.txt \\<br>  --iterations 10000 \\<br>  --mini_batch_size 1000 \\<br>  --objective_after_init \\<br>  --objective_after_training \\<br><br></pre>\r\n<pre># Step 3.  Apply the learned cluster centers to the training data.<br>$HOME/sofia-ml/sofia-kmeans \\<br>  --model_in full_kmeans_model.txt \\<br>  --test_file public_train_data.svmlight.dat \\<br>  --objective_on_test \\<br>  --cluster_mapping_out full_kmeans.train.dat \\<br>  --cluster_mapping_type rbf_kernel \\<br>  --cluster_mapping_param 0.01 \\<br><br># Step 4.  Apply the learned cluster centers to the test data.<br>$HOME/sofia-ml/sofia-kmeans \\<br>  --model_in full_kmeans_model.txt \\<br>  --test_filepublic_test_data.svmlight.dat \\<br>  --objective_on_test \\<br>  --cluster_mapping_out full_kmeans.test.dat \\<br>  --cluster_mapping_type rbf_kernel \\<br>  --cluster_mapping_param 0.01 \\</pre>\r\n&nbsp;\r\n<pre># Step 5.  Create dense CSV format versions of the new data sets.</pre>\r\n<pre>./svmlightToDenseFormat.pl full_kmeans.train.dat &gt; full_kmeans.train.dense.dat</pre>\r\n<pre>./svmlightToDenseFormat.pl full_kmeans.test.dat &gt; full_kmeans.test.dense.dat</pre>\r\n&nbsp;\r\n<pre># Step 6.  Execute the ./runLeaderboardEval.pl script.</pre>\r\n<pre>./runLeaderboardEval.pl full_kmeans.train.dense.dat ../competition_data/public_train.labels.dat full_kmeans.test.dense.dat /Users/dsculley/libsvm-3.1/ test.full_kmeans.out</pre>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "5960",
      "postDate": "10/08/2011 12:06:51",
      "content": "<p>For step 5 above, where is svmlightToDenseFormat.pl? (I only see denseFormatToSvmLight.pl in the competition download.)&nbsp; I recreated it, but including it in the download or posting it might be helpful. Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "5962",
      "postDate": "10/08/2011 12:25:40",
      "content": "<p>Oops, sorry not to have included that one. &nbsp;Here it is, attached.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 5960,
      "author_name": "chefele",
      "author_url": "",
      "post_date": "10/08/2011 12:06:51",
      "content": "<p>For step 5 above, where is svmlightToDenseFormat.pl? (I only see denseFormatToSvmLight.pl in the competition download.)&nbsp; I recreated it, but including it in the download or posting it might be helpful. Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 5962,
      "author_name": "argv",
      "author_url": "",
      "post_date": "10/08/2011 12:25:40",
      "content": "<p>Oops, sorry not to have included that one. &nbsp;Here it is, attached.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "5752": "",
    "5960": "",
    "5962": ""
  },
  "source": "meta"
}