Skip to content

Commit

Permalink
Modified for comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jan 7, 2015
1 parent 0aa51e4 commit 91a3860
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class LogisticGradient extends Gradient {
val gradientMultiplier = (1.0 / (1.0 + math.exp(margin))) - label
val gradient = data.copy
scal(gradientMultiplier, gradient)
val minusYP = label * margin
val minusYP = if (label > 0) margin else -margin

// log1p is log(1+p) but more accurate for small p
// Following two equations are the same analytically but not numerically, e.g.,
Expand Down

0 comments on commit 91a3860

Please sign in to comment.