-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] smoothed log sum implementation #18
Comments
I've encountered this smoothed version in OT (e.g., https://papers.nips.cc/paper/2016/file/2a27b8144ac02f67687f76782a3b5d8f-Paper.pdf) but just used Unfortunately, the implementation of logsumexp is not as simple and straightforward to read as I would like it to be, mainly because it is supposed to cover a variety of different use cases in an optimal way, e.g., regular arrays, iterators, and GPU arrays (JuliaStats/StatsFuns.jl#97). It's an implementation of the one-pass algorithm. To me it seems one would have to change LogExpFunctions.jl/src/logsumexp.jl Line 35 in 9e5de81
LogExpFunctions.jl/src/logsumexp.jl Line 46 in 9e5de81
alpha and sum(exp(x - alpha)) - 1 ) and one would have to modify the reductions in LogExpFunctions.jl/src/logsumexp.jl Line 64 in 9e5de81
LogExpFunctions.jl/src/logsumexp.jl Line 72 in 9e5de81
LogExpFunctions.jl/src/logsumexp.jl Line 86 in 9e5de81
|
thanks for this cool little package. I have a feature request/question. In discrete choice models (for example in this paper equation 14 ) we often have a smoothed version of the log sum function. that is, instead of
we'd have
I was trying to think how to add this to the package (maybe in my own fork if this turns out non of interest here), but I'm not totally sure where. My best guess would have been to do the division by sigma in places like here, but not totally certain. thanks for any hints!
The text was updated successfully, but these errors were encountered: