Hello Ted,

Thanks for the reply. But I am not able to understand what is the
point of *subtracting
the max value from every array element*. Here they are using *softmax
regression* instead of standard logistic regression. So how does
subtracting max value solves the problem?

Thanks
Namit


On Fri, May 23, 2014 at 6:18 PM, Ted Dunning <ted.dunn...@gmail.com> wrote:

> 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 <
> namitmaheshwa...@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
> >
>

Reply via email to