Add logmeanexp

Open
#81 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #120 by @cossio — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
backend

Research direction

Start by reviewing the existing logsumexp entry point and how dimension handling is implemented. Add logmeanexp with support for the dims keyword, then verify that its results match the intended log-mean-exp behavior for arrays and dimensions.

Written by the indexing model from the issue text.

Description

Hi,

I noticed that R and Python have logmeanexp. I think this would be a simple, yet useful addition. I would be willing to make a PR. The basic function would be

function logmeanexp(X::AbstractArray{<:Number})
    return logsumexp(X) - log(length(X))
end

Some additional logic would be needed to handled the dims keyword.

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaStats/LogExpFunctions.jl

All issues in JuliaStats/LogExpFunctions.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.