From 295b1ef4fb6a7c61ad1f2d876ba760814a2f5240 Mon Sep 17 00:00:00 2001 From: John Langford Date: Sat, 2 Feb 2013 16:39:08 -0500 Subject: [PATCH] add oaa test --- test/RunTests | 29 +++++++++++++++++------------ test/train-sets/ref/oaa.stderr | 24 ++++++++++++++++++++++++ test/train-sets/ref/oaa.stdout | 0 3 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 test/train-sets/ref/oaa.stderr create mode 100644 test/train-sets/ref/oaa.stdout diff --git a/test/RunTests b/test/RunTests index e3e06917c48..f131abf664e 100755 --- a/test/RunTests +++ b/test/RunTests @@ -627,63 +627,68 @@ __DATA__ train-sets/ref/cs_test.ldf.wap.stderr train-sets/ref/cs_test.ldf.wap.predict -# Test 11: Error Correcting Tournament +# Test 11: one-against-all +{VW} -k --oaa 10 -c --passes 10 train-sets/multiclass + train-sets/ref/oaa.stdout + train-sets/ref/oaa.stderr + +# Test 12: Error Correcting Tournament {VW} -k --ect 10 --error 3 -c --passes 10 --invariant train-sets/multiclass train-sets/ref/multiclass.stdout train-sets/ref/multiclass.stderr -# Test 12: Run searn on wsj_small for 12 passes, 4 passes per policy, extra features +# Test 13: Run searn on wsj_small for 12 passes, 4 passes per policy, extra features {VW} -k -c -d train-sets/wsj_small.dat.gz --passes 12 --invariant --searn_passes_per_policy 4 --searn_task sequence --searn 5 --searn_sequencetask_history 2 --searn_sequencetask_bigrams --searn_sequencetask_features 1 --quiet train-sets/ref/searn_wsj.stdout train-sets/ref/searn_wsj.stderr -# Test 13: Run searn (wap) on wsj_small for 2 passes, 1 pass per policy, extra features +# Test 14: Run searn (wap) on wsj_small for 2 passes, 1 pass per policy, extra features {VW} -k -b 19 -c -d train-sets/wsj_small.dat.gz --passes 2 --invariant --searn_passes_per_policy 1 --searn_task sequence --searn 5 --wap 5 --searn_sequencetask_history 2 --searn_sequencetask_bigrams --searn_sequencetask_features 1 --quiet train-sets/ref/searn_wsj2.dat.stdout train-sets/ref/searn_wsj2.dat.stderr -# Test 14: LBFGS on zero derivative input +# Test 15: LBFGS on zero derivative input {VW} -k -c -d train-sets/zero.dat --loss_function=squared -b 20 --bfgs --mem 7 --passes 5 --l2 1.0 train-sets/ref/zero.stdout train-sets/ref/zero.stderr -# Test 15: LBFGS early termination +# Test 16: LBFGS early termination {VW} -k -c -d train-sets/rcv1_small.dat --loss_function=logistic -b 20 --bfgs --mem 7 --passes 20 --termination 0.001 --l2 1.0 train-sets/ref/rcv1_small.stdout train-sets/ref/rcv1_small.stderr -# Test 16: Run LDA with 100 topics on 1000 Wikipedia articles +# Test 17: Run LDA with 100 topics on 1000 Wikipedia articles {LDA} -k --lda 100 --lda_alpha 0.01 --lda_rho 0.01 --lda_D 1000 -b 13 --minibatch 128 --invariant train-sets/wiki1K.dat train-sets/ref/wiki1K.stdout train-sets/ref/wiki1K.stderr -# Test 17: Run searn on seq_small for 12 passes, 4 passes per policy +# Test 18: Run searn on seq_small for 12 passes, 4 passes per policy {VW} -k -c -d train-sets/seq_small --passes 12 --invariant --searn_passes_per_policy 4 --searn 4 --searn_task sequence --quiet train-sets/ref/searn_small.stdout train-sets/ref/searn_small.stderr -# Test 18: neural network 3-parity with 2 hidden units +# Test 19: neural network 3-parity with 2 hidden units {VW} -k -c -d train-sets/3parity --hash all --passes 2000 -b 16 --nn 2 -l 10 --invariant -f models/0021.model --random_seed 11 --quiet train-sets/ref/3parity.stdout train-sets/ref/3parity.stderr -# Test 19: neural network 3-parity with 2 hidden units (predict) +# Test 20: neural network 3-parity with 2 hidden units (predict) {VW} -d train-sets/3parity --hash all -t -i models/0021.model -p 0022.predict.tmp pred-sets/ref/0022.stdout pred-sets/ref/0022.stderr pred-sets/ref/0022.predict -# Test 20: cubic features -- on a parity test case +# Test 21: cubic features -- on a parity test case {VW} -k -c -f models/xxor.model train-sets/xxor.dat --cubic abc --passes 100 train-sets/ref/xxor.stdout train-sets/ref/xxor.stderr -# Test 21: matrix factorization -- training +# Test 22: matrix factorization -- training {VW} -k -d train-sets/ml100k_small_train -b 16 -q ui --rank 10 --l2 0.001 --learning_rate 0.025 --passes 2 --decay_learning_rate 0.97 --power_t 0 -f movielens.reg --cache_file movielens.cache --loss_function classic train-sets/ref/ml100k_small.stdout train-sets/ref/ml100k_small.stderr -# Test 22: matrix factorization -- testing +# Test 23: matrix factorization -- testing {VW} -i movielens.reg -t -d test-sets/ml100k_small_test test-sets/ref/ml100k_small.stdout test-sets/ref/ml100k_small.stderr diff --git a/test/train-sets/ref/oaa.stderr b/test/train-sets/ref/oaa.stderr new file mode 100644 index 00000000000..27f5ae726db --- /dev/null +++ b/test/train-sets/ref/oaa.stderr @@ -0,0 +1,24 @@ +Num weight bits = 18 +learning rate = 0.5 +initial_t = 0 +power_t = 0.5 +decay_learning_rate = 1 +creating cache_file = train-sets/multiclass.cache +Reading datafile = train-sets/multiclass +num sources = 1 +average since example example current current current +loss last counter weight label predict features +0.666667 0.666667 3 3.0 3 1 2 +0.833333 1.000000 6 6.0 6 1 2 +0.818182 0.800000 11 11.0 1 1 2 +0.636364 0.454545 22 22.0 2 2 2 +0.318182 0.000000 44 44.0 4 4 2 +0.160920 0.000000 87 87.0 7 7 2 + +finished run +number of examples = 100 +weighted example sum = 100 +weighted label sum = 0 +average loss = 0.14 +best constant = 0 +total feature number = 200 diff --git a/test/train-sets/ref/oaa.stdout b/test/train-sets/ref/oaa.stdout new file mode 100644 index 00000000000..e69de29bb2d