exp(40) > 10^17
Thus, if x >= 1, for x + exp(40) all significant bits of the exponential
are lost and the result is identical to just saying x. Likewise for x <=1,
for 1+exp(40), the addition of 1 has no effect.
The logistic function [1] is defined as f(x) = 1 / (1 + exp(x)), thus when
using double precision floating point where x >= 40, f(x) = 1 and where x
<= 40, f(x) = 0.
[1] https://en.wikipedia.org/wiki/Logistic_function
On Fri, May 23, 2014 at 4:23 AM, namit maheshwari <
namitmaheshwari7@gmail.com> wrote:
> Hello Everyone,
>
> In mahout's *AbstractOnlineLogisticRegression *class the *public static
> Vector link(Vector v)*
> function checks the *max* value against 40.
>
> Could anyone please explain the significance of 40 in context of Logistic
> Regression?
>
> Thanks
> Namit
>
