私はこの側面では新しいです。 私は一連のデータを訓練して予測したいと思います。私は長い時間をかけて努力しましたが、私に何が間違っているか教えてください。このようなvowpal_wabbitの入力フォーマットについて
-1 '13731#276 |f gender:0 age_range:2 action0:1 action1:0 action2:1 action3:0
-1 '70175#4214 |f gender:0 age_range:4 action0:0 action1:0 action2:1 action3:0
-1 '89370#2598 |f gender:1 age_range:2 action0:8 action1:0 action2:1 action3:0
1 '89371#1250 |f gender:0 age_range:2 action0:0 action1:0 action2:1 action3:0
-1 '89372#2792 |f gender:1 age_range:5 action0:0 action1:0 action2:1 action3:0
1 '89372#962 |f gender:1 age_range:5 action0:0 action1:0 action2:1 action3:0
-1 '89373#4472 |f gender:0 age_range:7 action0:5 action1:0 action2:1 action3:0
テストデータ:
私の列車のデータは、この(私はここでトップ数行を選ぶ)のように見えます
1 '177796#1807 |f gender:0 age_range:5 action0:5 action1:0 action2:1 action3:0
1 '155638#2445 |f gender:0 age_range:7 action0:3 action1:0 action2:1 action3:0
1 '155639#658 |f gender:1 age_range:2 action0:5 action1:0 action2:1 action3:0
1 '127479#2480 |f gender:0 age_range:7 action0:0 action1:0 action2:1 action3:0
1 '127478#1245 |f gender:0 age_range:4 action0:1 action1:0 action2:1 action3:0
1 '127473#4995 |f gender:1 age_range:4 action0:13 action1:0 action2:1 action3:0
1 '127472#45 |f gender:0 age_range:7 action0:4 action1:0 action2:1 action3:0
はい、彼らは異なるように見えるん。私はそれが正しいかどうかわからない。私はgithubの多くの人々がこのようにそれらを書いているのを見る。
と私のVWコマンドは以下の通りです:
vw -d train.vw --loss_function=logistic -f model.vw
vw -d test.vw -t -i model.vw --loss_function=logistic -r shop.preds.txt
まあ、結果は数が実際には、以下-2以上となっている、という理由を私は知らない
-2.816693 177796#1807
-2.817430 155638#2445
-2.981194 155639#658
-2.821442 127479#2480
-2.823012 127478#1245
-2.968556 127473#4995
-2.816092 127472#45
-2.820939 127471#4010
-2.975476 127470#593
-2.820105 155634#4103
-2.799539 155635#2980
-3.139279 127475#1469
です私の理想的な結果は次のようである:
202178#1665,0.67
156148#4730,0.50
132360#2459,0.24
132360#144,0.99
180387#1534,0.48
187963#1360,0.19
158187#2534,0.54
188206#4890,0.70
は、少なくとも私は、番号が正しいことをしたいが、それはすべて1 共同でuldあなたはこれを修正する方法を教えてください?ありがとう!
あなたは正しいです....... – fourth
そして、vwの未処理の予測フォーマットをあなたの好みのCSVフォーマットに変換するには、以下を使用してください: 'perl -lane 'print $ F [1]、"、 "、$ F [ 0] 'shop.preds.txt' – arielf