Edited at

windowsマシンでvowpal wabbitを使う(個人的メモ)

More than 5 years have passed since last update.


事前準備

vowpal wabbitのインストールの前に以下をcygwinにインストールしておく。


  • autoconf

  • automake(aclocal)

  • libboost

  • libtool

  • zlib

  • zlib-dev


vowpal wabbitのインストール

vowpal wabbitのgithubからソースを含んだディレクトリ一式をclone

cd vowpal_wabbit

sh autogen.sh
make
make install

インストール後、your directory/vowpal_wabit/vowpalwavit/にPATHを通す。


テスト

# libsvm datasetから適当なデータを取ってくる

wget http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/duke.bz2

# 解凍
bzip2 -dc duke.bz2 > duke

# vw用にデータを加工
cat duke | sed -e 's/^1.000000 /1.f |/1' -e 's/^-1.000000 /-1.f |/1' > duke_vw

# lassoの実行
your directory/vowpal_wabbit/utl/vw-varinfo --sgd -l 2 --loss_function logistic --l1 0.0000001 --normalized duke_vw


結果

FeatureName        HashVal   MinVal   MaxVal    Weight   RelScore

^2713 2713 -1.10 1.97 +0.0007 100.00%
^6247 6247 -1.37 2.21 +0.0005 78.50%
^5167 5167 -1.40 2.04 +0.0005 73.50%
^4220 4220 -1.23 2.21 +0.0004 67.75%
^3598 3598 -2.31 2.20 +0.0004 66.52%
^2280 2280 -1.60 1.87 +0.0004 65.16%
^6004 6004 -1.55 1.90 +0.0004 64.82%
^7043 7043 -1.63 2.23 +0.0004 64.58%
^6924 6924 -1.27 2.26 +0.0004 64.39%
^2542 2542 -1.22 2.32 +0.0004 63.44%
^1505 1505 -2.34 2.44 +0.0004 61.89%
^6791 6791 -2.02 1.83 +0.0004 60.94%
^3823 3823 -0.98 2.36 +0.0004 60.07%
^835 835 -1.89 2.32 +0.0004 57.43%
^6262 6262 -1.11 2.49 +0.0004 57.11%
^462 462 -2.43 2.43 +0.0004 55.72%
^6156 6156 -1.42 2.40 +0.0004 54.40%
^672 672 -1.16 2.55 +0.0004 54.01%
^2228 2228 -1.69 2.33 +0.0004 53.98%
^4234 4234 -1.49 2.73 +0.0004 53.97%
^2793 2793 -2.32 2.15 +0.0003 52.79%
^4071 4071 -2.19 2.25 +0.0003 50.99%
^4414 4414 -1.14 2.65 +0.0003 50.92%
^6231 6231 -1.23 2.31 +0.0003 48.36%
^1488 1488 -1.37 2.66 +0.0003 48.28%
^6482 6482 -2.44 2.73 +0.0003 48.09%
^6726 6726 -1.47 2.19 +0.0003 47.87%
^961 961 -1.24 2.52 +0.0003 47.82%
^4697 4697 -1.49 2.45 +0.0003 47.39%
^2156 2156 -1.33 2.51 +0.0003 46.34%
^3921 3921 -1.49 2.25 +0.0003 46.20%
^5634 5634 -1.08 2.62 +0.0003 45.75%
^5639 5639 -0.88 2.83 +0.0003 45.70%
^3571 3571 -1.87 2.17 +0.0003 45.69%
^3375 3375 -1.86 2.39 +0.0003 45.49%
^3408 3408 -1.29 2.60 +0.0003 44.69%
^2309 2309 -2.04 2.10 +0.0003 44.44%
^5477 5477 -1.87 2.59 +0.0003 43.93%
^439 439 -1.64 2.14 +0.0003 43.68%
^709 709 -1.68 2.79 +0.0003 42.95%
^4320 4320 -1.65 2.01 +0.0003 42.39%
^6297 6297 -1.64 2.49 +0.0003 42.02%
^4993 4993 -1.80 2.41 +0.0003 41.92%
^2433 2433 -2.27 1.68 +0.0003 41.65%
^6546 6546 -1.74 2.54 +0.0003 41.38%
^847 847 -1.78 2.48 +0.0003 41.19%
^5122 5122 -1.83 2.10 +0.0003 41.18%
^1198 1198 -1.09 2.51 +0.0003 41.17%
^3448 3448 -1.41 2.67 +0.0003 41.10%
^5960 5960 -1.65 2.03 +0.0003 40.80%
^4861 4861 -2.19 2.60 +0.0003 40.63%
^2115 2115 -2.07 2.09 +0.0003 40.39%
^2863 2863 -2.05 2.24 +0.0003 40.32%
^666 666 -1.60 2.45 +0.0003 39.65%
^6419 6419 -1.19 2.67 +0.0003 39.53%
^4620 4620 -1.78 2.25 +0.0003 39.29%
^6916 6916 -1.72 2.45 +0.0003 39.18%
^3239 3239 -1.97 2.20 +0.0003 38.92%
^5321 5321 -1.40 2.36 +0.0003 38.77%
^1567 1567 -2.27 2.86 +0.0003 38.66%
^5075 5075 -2.26 2.46 +0.0003 38.53%
^2957 2957 -1.80 2.25 +0.0003 38.45%
^7079 7079 -1.73 2.23 +0.0003 38.39%
^918 918 -1.40 2.97 +0.0002 37.81%
^1982 1982 -2.07 2.66 +0.0002 37.55%
^1717 1717 -2.06 2.41 +0.0002 37.33%
^4598 4598 -1.89 2.34 +0.0002 36.87%
^5130 5130 -1.44 2.50 +0.0002 36.86%
^1116 1116 -2.26 1.85 +0.0002 36.80%
^4817 4817 -2.00 2.21 +0.0002 36.65%
^7005 7005 -1.49 2.91 +0.0002 36.49%
^6265 6265 -1.84 2.48 +0.0002 36.44%
^4233 4233 -2.04 2.53 +0.0002 36.37%
^2912 2912 -0.80 2.84 +0.0002 36.16%
^3111 3111 -1.74 2.88 +0.0002 35.97%
^3480 3480 -2.15 1.93 +0.0002 35.89%
^4445 4445 -0.71 3.11 +0.0002 35.57%
^2629 2629 -1.09 2.65 +0.0002 35.40%
^6237 6237 -2.72 2.31 +0.0002 35.35%
^7027 7027 -1.25 2.82 +0.0002 35.06%
^5723 5723 -1.39 2.69 +0.0002 34.60%
^4095 4095 -1.29 2.95 +0.0002 34.56%
^6361 6361 -1.76 2.29 +0.0002 34.44%
^6989 6989 -1.53 2.42 +0.0002 34.43%
^1521 1521 -1.43 2.56 +0.0002 34.40%
^5013 5013 -1.46 2.82 +0.0002 34.17%
^1393 1393 -1.65 2.82 +0.0002 34.08%
^975 975 -1.83 1.79 +0.0002 34.06%
^6564 6564 -1.65 2.53 +0.0002 34.04%
^4115 4115 -1.50 2.38 +0.0002 34.01%
^4945 4945 -2.21 2.26 +0.0002 33.91%
^4866 4866 -2.19 2.31 +0.0002 33.67%
^3755 3755 -1.75 3.09 +0.0002 33.59%
^4485 4485 -1.43 2.70 +0.0002 33.45%
^4083 4083 -1.83 2.21 +0.0002 33.43%
^641 641 -1.83 2.35 +0.0002 33.18%
^6917 6917 -1.61 2.96 +0.0002 32.99%
^4674 4674 -1.68 2.47 +0.0002 32.95%
^107 107 -1.89 2.01 +0.0002 32.90%
^1175 1175 -2.04 1.81 +0.0002 32.72%
^2150 2150 -1.44 2.47 +0.0002 32.62%
^543 543 -1.43 2.96 +0.0002 32.52%
^4937 4937 -2.41 2.21 +0.0002 32.47%
^6348 6348 -1.85 2.46 +0.0002 32.44%
^3274 3274 -1.94 2.63 +0.0002 32.36%
^2210 2210 -1.82 2.55 +0.0002 32.04%
^822 822 -2.04 3.26 +0.0002 31.83%
^4084 4084 -1.00 3.07 +0.0002 31.74%
^3798 3798 -2.08 2.27 +0.0002 31.64%
^5914 5914 -0.91 3.29 +0.0002 31.61%
^7129 7129 -1.97 2.28 +0.0002 31.58%
^4010 4010 -2.20 2.07 +0.0002 31.56%
^2936 2936 -1.36 3.23 +0.0002 31.39%
^3121 3121 -2.74 2.07 +0.0002 31.15%
^3117 3117 -1.59 2.41 +0.0002 31.11%
^4129 4129 -1.30 2.94 +0.0002 31.11%
^4579 4579 -1.54 3.01 +0.0002 31.10%
^3998 3998 -1.78 3.06 +0.0002 31.02%
^4646 4646 -1.81 2.46 +0.0002 30.73%
^3104 3104 -1.28 2.63 +0.0002 30.71%
^4711 4711 -2.82 2.66 +0.0002 30.62%
^687 687 -1.18 2.92 +0.0002 30.50%
^3756 3756 -1.46 2.72 +0.0002 30.47%
^6130 6130 -1.74 2.09 +0.0002 30.45%
^218 218 -1.20 2.62 +0.0002 30.44%
^2895 2895 -2.28 2.35 +0.0002 30.42%
^2534 2534 -1.01 3.02 +0.0002 30.29%
^3442 3442 -2.13 3.01 +0.0002 30.27%
^479 479 -1.95 2.96 +0.0002 30.25%
^3154 3154 -1.38 2.68 +0.0002 30.08%
^6847 6847 -2.32 2.66 +0.0002 29.98%
^6121 6121 -2.36 2.14 +0.0002 29.96%
^644 644 -1.63 2.68 +0.0002 29.89%
^6626 6626 -1.57 2.59 +0.0002 29.85%
^4082 4082 -1.62 1.89 +0.0002 29.64%
^5900 5900 -1.50 2.78 +0.0002 29.53%
^1568 1568 -2.06 2.35 +0.0002 29.38%
^6476 6476 -0.99 3.02 +0.0002 29.35%
^4987 4987 -1.10 3.19 +0.0002 29.30%
^6461 6461 -1.70 2.03 +0.0002 29.28%
^3695 3695 -2.21 2.36 +0.0002 29.18%
^6366 6366 -2.32 2.96 +0.0002 29.15%
^6534 6534 -2.84 2.66 +0.0002 29.03%
^864 864 -1.93 2.18 +0.0002 28.97%
^3671 3671 -1.94 2.34 +0.0002 28.93%
^4775 4775 -1.22 2.84 +0.0002 28.90%
^4561 4561 -1.69 3.21 +0.0002 28.90%
^6355 6355 -1.60 2.78 +0.0002 28.84%
^4383 4383 -1.20 2.84 +0.0002 28.79%
^15 15 -1.59 2.90 +0.0002 28.70%
^4317 4317 -1.09 2.37 +0.0002 28.65%
^1428 1428 -1.40 2.63 +0.0002 28.52%
^5614 5614 -1.84 2.20 +0.0002 28.38%
^7078 7078 -1.83 1.92 +0.0002 28.11%
^5868 5868 -1.47 2.41 +0.0002 28.10%
^1493 1493 -1.44 2.49 +0.0002 27.82%
^370 370 -2.22 3.28 +0.0002 27.80%
^6165 6165 -2.07 2.45 +0.0002 27.77%
^5430 5430 -2.25 2.96 +0.0002 27.67%
^2768 2768 -1.65 2.78 +0.0002 27.64%
^2525 2525 -1.39 3.04 +0.0002 27.55%
^4850 4850 -1.64 3.06 +0.0002 27.52%
^4979 4979 -1.79 2.67 +0.0002 27.51%
^6684 6684 -2.10 2.82 +0.0002 27.49%
^3810 3810 -1.88 2.72 +0.0002 27.44%
^4382 4382 -1.59 2.40 +0.0002 27.29%
^1551 1551 -1.58 2.34 +0.0002 27.27%
^6186 6186 -1.17 3.02 +0.0002 27.23%
^1928 1928 -1.96 2.69 +0.0002 27.22%
^3471 3471 -1.16 2.93 +0.0002 27.19%
^1115 1115 -1.53 3.23 +0.0002 27.15%
^2934 2934 -1.96 2.04 +0.0002 27.05%
^5815 5815 -1.27 3.23 +0.0002 27.04%
^1931 1931 -1.52 2.57 +0.0002 26.95%
^2782 2782 -2.21 2.77 +0.0002 26.81%
^3559 3559 -2.34 2.44 +0.0002 26.78%
^2698 2698 -2.59 2.07 +0.0002 26.77%
^2633 2633 -2.21 2.21 +0.0002 26.75%
^2415 2415 -1.83 3.06 +0.0002 26.72%
^6255 6255 -1.83 3.00 +0.0002 26.69%
^6907 6907 -2.14 2.32 +0.0002 26.62%
^6620 6620