summaryrefslogtreecommitdiff
path: root/dtrain
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-10-20 02:20:43 +0200
committerPatrick Simianer <p@simianer.de>2011-10-20 02:20:43 +0200
commit082b6c77e0703ccd1c85947828c33d4b0eef20f0 (patch)
treeb484bd0c4216525690de8b14fb654c9581a300c2 /dtrain
parent77b4d84faf291a7deff116030f9bc0c70e79409a (diff)
really merged fix
Diffstat (limited to 'dtrain')
-rw-r--r--dtrain/README.md2
-rw-r--r--dtrain/dtrain.cc8
-rw-r--r--dtrain/kbestget.h7
-rw-r--r--dtrain/test/example/dtrain.ini8
4 files changed, 11 insertions, 14 deletions
diff --git a/dtrain/README.md b/dtrain/README.md
index 1ee3823e..b453c649 100644
--- a/dtrain/README.md
+++ b/dtrain/README.md
@@ -43,7 +43,7 @@ Uncertain, known bugs, problems
FIXME
-----
-* merge with cdec master
+none
Data
----
diff --git a/dtrain/dtrain.cc b/dtrain/dtrain.cc
index 795c82fd..05c3728d 100644
--- a/dtrain/dtrain.cc
+++ b/dtrain/dtrain.cc
@@ -349,12 +349,12 @@ main(int argc, char** argv)
// DEBUG
vector<weight_t> x;
lambdas.init_vector(&x);
- cout << "[" << ii << "]" << endl;
+ //cout << "[" << ii << "]" << endl;
for (int jj = 0; jj < x.size(); jj++) {
- if (x[jj] != 0)
- cout << FD::Convert(jj) << " " << x[jj] << endl;
+ //if (x[jj] != 0)
+ //cout << FD::Convert(jj) << " " << x[jj] << endl;
}
- cout << " --- " << endl;
+ //cout << " --- " << endl;
// /DEBUG
++ii;
diff --git a/dtrain/kbestget.h b/dtrain/kbestget.h
index 98f289eb..abe657d0 100644
--- a/dtrain/kbestget.h
+++ b/dtrain/kbestget.h
@@ -107,10 +107,7 @@ struct KBestGetter : public HypSampler
ScoredHyp h;
h.w = d->yield;
h.f = d->feature_values;
- h.model = d->score.as_float();
- // DEBUG
- cout << i+1 << ". "<< h.model << endl;
- // /DEBUG
+ h.model = log(d->score);
h.rank = i;
h.score = scorer_->Score(h.w, *ref_, i);
s_.push_back(h);
@@ -129,7 +126,7 @@ struct KBestGetter : public HypSampler
ScoredHyp h;
h.w = d->yield;
h.f = d->feature_values;
- h.model = d->score.as_float();
+ h.model = log(d->score);
h.rank = i;
h.score = scorer_->Score(h.w, *ref_, i);
s_.push_back(h);
diff --git a/dtrain/test/example/dtrain.ini b/dtrain/test/example/dtrain.ini
index 96bdbf8e..185d6d90 100644
--- a/dtrain/test/example/dtrain.ini
+++ b/dtrain/test/example/dtrain.ini
@@ -1,14 +1,14 @@
decoder_config=test/example/cdec.ini
k=100
N=3
-gamma=0 #.00001
-epochs=2
+gamma=0
+epochs=5
input=test/example/nc-1k-tabs.gz
scorer=stupid_bleu
output=-
-stop_after=5
+stop_after=100
sample_from=kbest
-pair_sampling=all #108010
+pair_sampling=all
select_weights=VOID
print_weights=Glue WordPenalty LanguageModel LanguageModel_OOV PhraseModel_0 PhraseModel_1 PhraseModel_2 PhraseModel_3 PhraseModel_4 PassThrough
tmp=/tmp