Contributing survival models as a module to pymc3

Hi everyone,

As part of my dissertation, I have written code for a variety of different Bayesian survival models.
These include:

  1. Univariate Parametric Survival models (Accelerated failure time, Weibull, etc)
  2. Univariate Semi-Parametric models using B-splines
  3. Multivariate Frailty models (parametric and semi-parametric)
  4. Right censored Archimedean copula models (Semi-parametric and Parametric).

After discussing at length with Chris Fonnesbeck, I am interested in contributing these to Pymc3 as a survival module much like the glm submodule (in fact, I adapted the general glm framework for these models). These models also have syntax like the glm module for ease of use.

As far as I understand, I might need to submit a WIP pull request. However, I am somewhat new to the github contribution process for a project at this scale so I could use some guidance surrounding best practices for contributing code.

From a high level, should I be getting the submodule to work with a pymc3 fork first and then submit the WIP pull request?

Thanks!

5 Likes

Hi @schluedj, that sounds really interesting! I am especially interested about the copula models.

As for contributing, I think you might find it useful to have a look at how the Gaussian Process module is added. Here you will find the first Pull request of adding GP. If you have any question feel free to ask here or on Github.

FYI, this PR also aims to extend the survival models: https://github.com/pymc-devs/pymc3/pull/2942#issuecomment-383359239 but I dont think there is any more work has been done on it.

1 Like

Hey Junpeng,

Awesome, the GP pull request is really helpful; I’ll follow those steps.

Thanks!

  • David