Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
Fixed score calculation w.r.t bias values in predict()
Browse files Browse the repository at this point in the history
  • Loading branch information
myui committed Oct 18, 2013
1 parent 06d6239 commit f895269
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Expand Up @@ -200,7 +200,7 @@ protected float predict(final List<?> features) {
if(biasKey != null) {
WeightValue biasWeight = weights.get(biasKey);
if(biasWeight != null) {
score += biasWeight.getValue();
score += (biasWeight.getValue() + bias);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/hivemall/regression/OnlineRegressionUDTF.java
Expand Up @@ -204,7 +204,7 @@ protected float predict(final Collection<?> features) {
if(biasKey != null) {
FloatWritable biasWeight = weights.get(biasKey);
if(biasWeight != null) {
score += biasWeight.get();
score += (biasWeight.get() * bias);
}
}

Expand Down
Binary file modified target/hivemall.jar
Binary file not shown.

0 comments on commit f895269

Please sign in to comment.