Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed score calculation w.r.t bias values in predict()

  • Loading branch information...
commit f895269e5327fa8165687bed3da8bf4ea85b9e22 1 parent 06d6239
Makoto YUI authored
2  src/main/hivemall/classifier/BinaryOnlineClassifierUDTF.java
View
@@ -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);
}
}
2  src/main/hivemall/regression/OnlineRegressionUDTF.java
View
@@ -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);
}
}
BIN  target/hivemall.jar
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.