Weighted logsumexp
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Read the existing logsumexp functions and their source first, then trace how reductions are currently implemented in Julia. Define the weighted vector and matrix cases, including very small or zero weights, and verify that the resulting log(dot(w, exp.(x))) and x -> log.(K*exp.(x)) behavior is covered.
Written by the indexing model from the issue text.
Description
Let w, x be vectors. I'm interested in computing log(dot(w, exp.(x)). The current logsumexp functions can be used to compute this, but one must take log.(w)which is troublesome when w can be very small or zero. I took a look at the source and I think actually it should be straightforward to extend the current code. The end goal for this would be to implement x -> log.(K*exp.(x)) where K is a matrix and x is a vector.
What I'm not so familiar with is how to implement the reduction in Julia in an efficient manner. At a high level, the first thing that comes to mind for me is to do something like a binary operation of the type x, (y, w) -> log(exp(x) + w*exp(y)) and do a reduction over pairs of data and weights. But I'd appreciate some input on how this should be best done.
- Dominant language
- Julia
- Stars
- 86
- Forks
- 25
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaStats/LogExpFunctions.jl
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
JuliaStats/LogExpFunctions.jl#134 · 2 comments ·
-
Precision loss for BigFloat in logexpm1, logcosh and log1pmxPossibly taken @devmotion claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
JuliaStats/LogExpFunctions.jl#135 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaStats/LogExpFunctions.jl#102 · 4 comments ·
-
exp-weighted meanOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
log-cumsum-exp ?Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
All issues in JuliaStats/LogExpFunctions.jl
Similar issues
-
code bug PowerSystems 6.0
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Sienna-Platform/PowerSystems.jl#1849 ·
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
FluxML/Metalhead.jl#407 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100