dfm / dfm/emcee

Correct way to calculate the model evidence

Open
#348 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.6k
Forks
440
PR merge metrics
No merged PRs in 30d

Description

Hi everyone,

I'm using an EnsembleSampler to fit a series of models to the data. For each model, I'm interested in an estimate of the best fitting parameters, but I'd also like to calculate the odds ratios for all the models in order to understand which one is better describing the data.
To do so I need to recover the evidence, i.e. the integral of the un-normalized posterior. Is there a way to recover this information from the output of run_mcmc() when using an EnsembleSampler?
I know that PTSampler can do it but I saw that it was moved to another package. Since I'm working on a pre-existing code, I'd prefer not to adapt it to use the new ptemcee package if there is a reasonable way to get these data using the current implementation of the algorithm.

Thanks in advance for the help,

Cheers,
Enrico

Contributor guide

Open the contributing guide

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.

Research direction

The issue names EnsembleSampler, run_mcmc(), PTSampler, and ptemcee but does not mention repository files or tests. Start by checking whether run_mcmc() exposes evidence-related output; a contribution would need defined implementation and validation criteria, which the issue does not provide.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.