Skip to content
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

Add coalescent likelihoods to contrib.epidemiology #2468

Closed
wants to merge 33 commits into from

Conversation

eb8680
Copy link
Member

@eb8680 eb8680 commented May 8, 2020

Addresses #2426
Pair-coded with @fritzo

This PR adds a new example model that includes a phylogenetic term.

(part of this PR was moved to #2474:)

This PR adds a phylogenetic likelihood translated from EpiGenMCMC to `contrib.epidemiology`, and adds a new example model that includes a phylogenetic term. There are two implementations of the likelihood here, a vectorized and non-vectorized version (in coalescent event sequence and hence in simulation time). In smoke testing with the example in this PR, the two appear to behave identically in `transition_fwd`, and the vectorized version should be easy (with a bit of judicious masking) to integrate with our parallel-scan inference machinery.

Tasks:

  • Add sequential likelihood implementation
  • Add naive vectorized likelihood implementation
  • Add a temporary script for preprocessing data
  • Add a simple example and use it as a smoke test with some real data
  • Integrate the vectorized likelihood together with some naively tensorized data into transition_bwd
  • Convert likelihoods to TorchDistributions
  • Add unit tests that check math and broadcasting
  • Add documentation
  • Investigate less memory-intensive approaches to vectorized likelihood evaluation, perhaps by converting the data into PyTorch sparse tensors
  • Usability: allow non-sorted coal_times or at least explain error
  • Usability: consider allowing negative coal_times
  • Add unit tests that check against some ground-truth likelihoods (blocked by lack of ground truth)
  • Remove temporary preprocessing script with R/Rpy2 dependency

@fritzo
Copy link
Member

fritzo commented May 14, 2020

I'd like to update this PR with math from #2474 and update the example to parse a phylogeny.nwk

@fritzo fritzo reopened this May 14, 2020
@fritzo fritzo mentioned this pull request May 16, 2020
2 tasks
@fritzo fritzo added the Blocked label May 16, 2020
@fritzo fritzo removed the Blocked label May 21, 2020
@fritzo
Copy link
Member

fritzo commented Jun 15, 2020

Closing in favor of a tutorial notebook.

@fritzo fritzo closed this Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants