summaryrefslogtreecommitdiff
path: root/training/dtrain/examples
diff options
context:
space:
mode:
authorMichael Denkowski <mdenkows@cs.cmu.edu>2013-08-19 08:24:48 -0700
committerMichael Denkowski <mdenkows@cs.cmu.edu>2013-08-19 08:24:48 -0700
commitcd666f441d91109d402e4f3993a9ec3c45306dd0 (patch)
tree3ef5083b5a52929b89ed18730104aace4934faf6 /training/dtrain/examples
parentac469cdf4c70154a1c2cedce9edf5cdc3bdb2d61 (diff)
parent951e7daa9539ffe640f9421897c374f786af53e7 (diff)
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'training/dtrain/examples')
-rw-r--r--training/dtrain/examples/parallelized/cdec.ini2
-rw-r--r--training/dtrain/examples/parallelized/dtrain.ini2
-rw-r--r--training/dtrain/examples/parallelized/work/out.0.09
-rw-r--r--training/dtrain/examples/parallelized/work/out.0.19
-rw-r--r--training/dtrain/examples/parallelized/work/out.1.09
-rw-r--r--training/dtrain/examples/parallelized/work/out.1.19
-rw-r--r--training/dtrain/examples/standard/dtrain.ini24
-rw-r--r--training/dtrain/examples/standard/expected-output86
8 files changed, 76 insertions, 74 deletions
diff --git a/training/dtrain/examples/parallelized/cdec.ini b/training/dtrain/examples/parallelized/cdec.ini
index e43ba1c4..5773029a 100644
--- a/training/dtrain/examples/parallelized/cdec.ini
+++ b/training/dtrain/examples/parallelized/cdec.ini
@@ -4,7 +4,7 @@ intersection_strategy=cube_pruning
cubepruning_pop_limit=200
scfg_max_span_limit=15
feature_function=WordPenalty
-feature_function=KLanguageModel ../example/nc-wmt11.en.srilm.gz
+feature_function=KLanguageModel ../standard//nc-wmt11.en.srilm.gz
#feature_function=ArityPenalty
#feature_function=CMR2008ReorderingFeatures
#feature_function=Dwarf
diff --git a/training/dtrain/examples/parallelized/dtrain.ini b/training/dtrain/examples/parallelized/dtrain.ini
index f19ef891..0b0932d6 100644
--- a/training/dtrain/examples/parallelized/dtrain.ini
+++ b/training/dtrain/examples/parallelized/dtrain.ini
@@ -11,6 +11,4 @@ pair_sampling=XYX
hi_lo=0.1
select_weights=last
print_weights=Glue WordPenalty LanguageModel LanguageModel_OOV PhraseModel_0 PhraseModel_1 PhraseModel_2 PhraseModel_3 PhraseModel_4 PhraseModel_5 PhraseModel_6 PassThrough
-# newer version of the grammar extractor use different feature names:
-#print_weights=Glue WordPenalty LanguageModel LanguageModel_OOV PhraseModel_0 PhraseModel_1 PhraseModel_2 PhraseModel_3 PhraseModel_4 PhraseModel_5 PhraseModel_6 PassThrough
decoder_config=cdec.ini
diff --git a/training/dtrain/examples/parallelized/work/out.0.0 b/training/dtrain/examples/parallelized/work/out.0.0
index 7a00ed0f..c559dd4d 100644
--- a/training/dtrain/examples/parallelized/work/out.0.0
+++ b/training/dtrain/examples/parallelized/work/out.0.0
@@ -1,9 +1,9 @@
cdec cfg 'cdec.ini'
Loading the LM will be faster if you build a binary file.
-Reading ../example/nc-wmt11.en.srilm.gz
+Reading ../standard//nc-wmt11.en.srilm.gz
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
-Seeding random number sequence to 3121929377
+Seeding random number sequence to 405292278
dtrain
Parameters:
@@ -16,6 +16,7 @@ Parameters:
learning rate 0.0001
gamma 0
loss margin 1
+ faster perceptron 0
pairs 'XYX'
hi lo 0.1
pair threshold 0
@@ -51,11 +52,11 @@ WEIGHTS
non0 feature count: 12
avg list sz: 100
avg f count: 11.32
-(time 0.37 min, 4.4 s/S)
+(time 0.35 min, 4.2 s/S)
Writing weights file to 'work/weights.0.0' ...
done
---
Best iteration: 1 [SCORE 'stupid_bleu'=0.17521].
-This took 0.36667 min.
+This took 0.35 min.
diff --git a/training/dtrain/examples/parallelized/work/out.0.1 b/training/dtrain/examples/parallelized/work/out.0.1
index e2bd6649..8bc7ea9c 100644
--- a/training/dtrain/examples/parallelized/work/out.0.1
+++ b/training/dtrain/examples/parallelized/work/out.0.1
@@ -1,9 +1,9 @@
cdec cfg 'cdec.ini'
Loading the LM will be faster if you build a binary file.
-Reading ../example/nc-wmt11.en.srilm.gz
+Reading ../standard//nc-wmt11.en.srilm.gz
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
-Seeding random number sequence to 2767202922
+Seeding random number sequence to 43859692
dtrain
Parameters:
@@ -16,6 +16,7 @@ Parameters:
learning rate 0.0001
gamma 0
loss margin 1
+ faster perceptron 0
pairs 'XYX'
hi lo 0.1
pair threshold 0
@@ -52,11 +53,11 @@ WEIGHTS
non0 feature count: 12
avg list sz: 100
avg f count: 10.496
-(time 0.32 min, 3.8 s/S)
+(time 0.35 min, 4.2 s/S)
Writing weights file to 'work/weights.0.1' ...
done
---
Best iteration: 1 [SCORE 'stupid_bleu'=0.26638].
-This took 0.31667 min.
+This took 0.35 min.
diff --git a/training/dtrain/examples/parallelized/work/out.1.0 b/training/dtrain/examples/parallelized/work/out.1.0
index 6e790e38..65d1e7dc 100644
--- a/training/dtrain/examples/parallelized/work/out.1.0
+++ b/training/dtrain/examples/parallelized/work/out.1.0
@@ -1,9 +1,9 @@
cdec cfg 'cdec.ini'
Loading the LM will be faster if you build a binary file.
-Reading ../example/nc-wmt11.en.srilm.gz
+Reading ../standard//nc-wmt11.en.srilm.gz
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
-Seeding random number sequence to 1432415010
+Seeding random number sequence to 4126799437
dtrain
Parameters:
@@ -16,6 +16,7 @@ Parameters:
learning rate 0.0001
gamma 0
loss margin 1
+ faster perceptron 0
pairs 'XYX'
hi lo 0.1
pair threshold 0
@@ -51,11 +52,11 @@ WEIGHTS
non0 feature count: 11
avg list sz: 100
avg f count: 11.814
-(time 0.45 min, 5.4 s/S)
+(time 0.43 min, 5.2 s/S)
Writing weights file to 'work/weights.1.0' ...
done
---
Best iteration: 1 [SCORE 'stupid_bleu'=0.10863].
-This took 0.45 min.
+This took 0.43333 min.
diff --git a/training/dtrain/examples/parallelized/work/out.1.1 b/training/dtrain/examples/parallelized/work/out.1.1
index 0b984761..f479fbbc 100644
--- a/training/dtrain/examples/parallelized/work/out.1.1
+++ b/training/dtrain/examples/parallelized/work/out.1.1
@@ -1,9 +1,9 @@
cdec cfg 'cdec.ini'
Loading the LM will be faster if you build a binary file.
-Reading ../example/nc-wmt11.en.srilm.gz
+Reading ../standard//nc-wmt11.en.srilm.gz
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
-Seeding random number sequence to 1771918374
+Seeding random number sequence to 2112412848
dtrain
Parameters:
@@ -16,6 +16,7 @@ Parameters:
learning rate 0.0001
gamma 0
loss margin 1
+ faster perceptron 0
pairs 'XYX'
hi lo 0.1
pair threshold 0
@@ -52,11 +53,11 @@ WEIGHTS
non0 feature count: 12
avg list sz: 100
avg f count: 11.224
-(time 0.42 min, 5 s/S)
+(time 0.45 min, 5.4 s/S)
Writing weights file to 'work/weights.1.1' ...
done
---
Best iteration: 1 [SCORE 'stupid_bleu'=0.13169].
-This took 0.41667 min.
+This took 0.45 min.
diff --git a/training/dtrain/examples/standard/dtrain.ini b/training/dtrain/examples/standard/dtrain.ini
index e1072d30..23e94285 100644
--- a/training/dtrain/examples/standard/dtrain.ini
+++ b/training/dtrain/examples/standard/dtrain.ini
@@ -10,15 +10,15 @@ print_weights=Glue WordPenalty LanguageModel LanguageModel_OOV PhraseModel_0 Phr
stop_after=10 # stop epoch after 10 inputs
# interesting stuff
-epochs=2 # run over input 2 times
-k=100 # use 100best lists
-N=4 # optimize (approx) BLEU4
-scorer=stupid_bleu # use 'stupid' BLEU+1
-learning_rate=1.0 # learning rate, don't care if gamma=0 (perceptron)
-gamma=0 # use SVM reg
-sample_from=kbest # use kbest lists (as opposed to forest)
-filter=uniq # only unique entries in kbest (surface form)
-pair_sampling=XYX #
-hi_lo=0.1 # 10 vs 80 vs 10 and 80 vs 10 here
-pair_threshold=0 # minimum distance in BLEU (here: > 0)
-loss_margin=0 # update if correctly ranked, but within this margin
+epochs=2 # run over input 2 times
+k=100 # use 100best lists
+N=4 # optimize (approx) BLEU4
+scorer=fixed_stupid_bleu # use 'stupid' BLEU+1
+learning_rate=1.0 # learning rate, don't care if gamma=0 (perceptron)
+gamma=0 # use SVM reg
+sample_from=kbest # use kbest lists (as opposed to forest)
+filter=uniq # only unique entries in kbest (surface form)
+pair_sampling=XYX #
+hi_lo=0.1 # 10 vs 80 vs 10 and 80 vs 10 here
+pair_threshold=0 # minimum distance in BLEU (here: > 0)
+loss_margin=0 # update if correctly ranked, but within this margin
diff --git a/training/dtrain/examples/standard/expected-output b/training/dtrain/examples/standard/expected-output
index 7cd09dbf..21f91244 100644
--- a/training/dtrain/examples/standard/expected-output
+++ b/training/dtrain/examples/standard/expected-output
@@ -4,14 +4,14 @@ Reading ./nc-wmt11.en.srilm.gz
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
****************************************************************************************************
Example feature: Shape_S00000_T00000
-Seeding random number sequence to 2679584485
+Seeding random number sequence to 970626287
dtrain
Parameters:
k 100
N 4
T 2
- scorer 'stupid_bleu'
+ scorer 'fixed_stupid_bleu'
sample from 'kbest'
filter 'uniq'
learning rate 1
@@ -34,58 +34,58 @@ Iteration #1 of 2.
. 10
Stopping after 10 input sentences.
WEIGHTS
- Glue = -576
- WordPenalty = +417.79
- LanguageModel = +5117.5
- LanguageModel_OOV = -1307
- PhraseModel_0 = -1612
- PhraseModel_1 = -2159.6
- PhraseModel_2 = -677.36
- PhraseModel_3 = +2663.8
- PhraseModel_4 = -1025.9
- PhraseModel_5 = -8
- PhraseModel_6 = +70
- PassThrough = -1455
+ Glue = -614
+ WordPenalty = +1256.8
+ LanguageModel = +5610.5
+ LanguageModel_OOV = -1449
+ PhraseModel_0 = -2107
+ PhraseModel_1 = -4666.1
+ PhraseModel_2 = -2713.5
+ PhraseModel_3 = +4204.3
+ PhraseModel_4 = -1435.8
+ PhraseModel_5 = +916
+ PhraseModel_6 = +190
+ PassThrough = -2527
---
- 1best avg score: 0.27697 (+0.27697)
- 1best avg model score: -47918 (-47918)
- avg # pairs: 581.9 (meaningless)
- avg # rank err: 581.9
+ 1best avg score: 0.17874 (+0.17874)
+ 1best avg model score: 88399 (+88399)
+ avg # pairs: 798.2 (meaningless)
+ avg # rank err: 798.2
avg # margin viol: 0
- non0 feature count: 703
- avg list sz: 90.9
- avg f count: 100.09
-(time 0.25 min, 1.5 s/S)
+ non0 feature count: 887
+ avg list sz: 91.3
+ avg f count: 126.85
+(time 0.33 min, 2 s/S)
Iteration #2 of 2.
. 10
WEIGHTS
- Glue = -622
- WordPenalty = +898.56
- LanguageModel = +8066.2
- LanguageModel_OOV = -2590
- PhraseModel_0 = -4335.8
- PhraseModel_1 = -5864.4
- PhraseModel_2 = -1729.8
- PhraseModel_3 = +2831.9
- PhraseModel_4 = -5384.8
- PhraseModel_5 = +1449
- PhraseModel_6 = +480
- PassThrough = -2578
+ Glue = -1025
+ WordPenalty = +1751.5
+ LanguageModel = +10059
+ LanguageModel_OOV = -4490
+ PhraseModel_0 = -2640.7
+ PhraseModel_1 = -3757.4
+ PhraseModel_2 = -1133.1
+ PhraseModel_3 = +1837.3
+ PhraseModel_4 = -3534.3
+ PhraseModel_5 = +2308
+ PhraseModel_6 = +1677
+ PassThrough = -6222
---
- 1best avg score: 0.37119 (+0.094226)
- 1best avg model score: -1.3174e+05 (-83822)
- avg # pairs: 584.1 (meaningless)
- avg # rank err: 584.1
+ 1best avg score: 0.30764 (+0.12891)
+ 1best avg model score: -2.5042e+05 (-3.3882e+05)
+ avg # pairs: 725.9 (meaningless)
+ avg # rank err: 725.9
avg # margin viol: 0
- non0 feature count: 1115
+ non0 feature count: 1499
avg list sz: 91.3
- avg f count: 90.755
-(time 0.3 min, 1.8 s/S)
+ avg f count: 114.34
+(time 0.32 min, 1.9 s/S)
Writing weights file to '-' ...
done
---
-Best iteration: 2 [SCORE 'stupid_bleu'=0.37119].
-This took 0.55 min.
+Best iteration: 2 [SCORE 'fixed_stupid_bleu'=0.30764].
+This took 0.65 min.