Skip to content

Commit

Permalink
MOD:last tree not multiply learningrate
Browse files Browse the repository at this point in the history
  • Loading branch information
scharoun committed May 10, 2018
1 parent aa26f8a commit 6027310
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ public double score(Map<String, Float> features, Object other) {
int vidx = ((j + 1) << 1) - 1;
mu[idx + j] = mu[idx + vidx] + mu[idx + vidx + 1];
}
fx += learningRate * mu[idx];
if (tree < treeNum - 1) {
fx += learningRate * mu[idx];
} else {
fx += mu[idx];
}

idx += stride;
idxg += K;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ public double score(Map<String, Float> features, Object other) {
int vidx = ((j + 1) << 1) - 1;
mu[idxm + j] = mu[idxm + vidx] + mu[idxm + vidx + 1];
}
fx += learningRate * mu[idxm];

if (tree < treeNum - 1) {
fx += learningRate * mu[idxm];
} else {
fx += mu[idxm];
}

idx += K - 1;
idxg += K;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,12 @@ public double score(Map<String, Float> features, Object other) {
lfx += gk_1 * wx[idx + stride - 1];
gating[tree * K + K - 1] = gk_1;

fx += learningRate * lfx;
if (tree < treeNum - 1) {
fx += learningRate * lfx;
} else {
fx += lfx;
}


idx += stride;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,12 @@ public double score(Map<String, Float> features, Object other) {
lfx += gk_1 * leaf[tree][vstart - 1];
gating[tree * K + K - 1] = gk_1;

fx += learningRate * lfx;
if (tree < treeNum - 1) {
fx += learningRate * lfx;
} else {
fx += lfx;
}

idx += stride;

}
Expand Down

0 comments on commit 6027310

Please sign in to comment.