-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Open
Labels
featureA request for a proper, new feature.A request for a proper, new feature.module: reductionstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🚀 Feature
scikit's implementation of logsumexp accepts a supplemental array of scaling factors that allow for subtraction instead of just addition.
https://docs.scipy.org/doc/scipy-0.19.0/reference/generated/scipy.misc.logsumexp.html
Motivation
I'm doing work with log probabilities and need to subtract some likelihoods from each other. Currently I have to move to linear probabilities first.
Pitch
If logsumexp is operating over a dimension of size N, accept an additional tensor of size (N,) of scaling factors, to match the functionality in scikit
https://docs.scipy.org/doc/scipy-0.19.0/reference/generated/scipy.misc.logsumexp.html
Alternatives
subtraction of probabilities in linear space, but this has numerical stability issues obviously.
cnguyen10, zhixuan-lin, yzhangcs, n-gao, apozas and 5 more
Metadata
Metadata
Assignees
Labels
featureA request for a proper, new feature.A request for a proper, new feature.module: reductionstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module