[Scipy-tickets] [SciPy] #437: Implements the logsumexp trick
SciPy
scipy-tickets@scipy....
Tue Jun 5 06:04:51 CDT 2007
#437: Implements the logsumexp trick
--------------------+-------------------------------------------------------
Reporter: cdavid | Owner: cdavid
Type: task | Status: new
Priority: high | Milestone: pymachine: cleaning existing toolboxes
Component: pyem | Version:
Severity: normal | Resolution:
Keywords: |
--------------------+-------------------------------------------------------
Old description:
> Because likelihood may take really low values, this can lead to numerical
> instabilities. One trick is to use loglikelihood instead: when likelihood
> are added, this cannot be done in the log domain directly, and the
> logsumexp trick is a trick to avoid precision loss when likelihood values
> need to be added.
New description:
Because likelihood may take really low values, this can lead to numerical
instabilities. One trick is to use loglikelihood instead: when likelihood
are added, this cannot be done in the log domain directly, and the
logsumexp trick is a trick to avoid precision loss when likelihood values
need to be added.
Some info can be seen there: http://www.ai.mit.edu/courses/6.867-f01/hw4/.
There are really two problems involved, actually:
* uses log likelihood. The logsumexp trick avoids precision lost when
computing sums of log likelihood
* at the end, we need to go back into "linear domain". There still can be
problems here (for example, using the logsumexp trick with the following
values will pose problems when going into the linear domain because of
huge difference between the values: log (exp (-1) + exp (-120)). That is,
logsumexp can only solve problems where most values are within the same
range; if not, removing the max won't help.
--
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/437#comment:1>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list