pymc-devs / pymc-devs/pymc-examples

ENH: Time dependent missingness in time series models

Open
#846 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

proposal
Dominant language
Python
Stars
398
Forks
325
Avg merge
9d 15m
Merged PRs (30d)
1

Description

In some time series, missing values don’t seem reasonable to treat as missing at random. in my data, whether an observation was recorded appeared to depend on the state of the underlying time series, with dropouts around extreme values or rapid changes.

pymc supports missing data by treating missing observations as latent variables, which works well when missingness is unrelated to the latent process. In this case, assuming missing at random led to posteriors that smoothed through unstable regions and showed lower uncertainty exactly where the system seemed most volatile.

Conceptually, this suggests two coupled processes: a latent time series
𝑦𝑡 that exists at all time points, and a missingness indicator 𝑚𝑡 whose probability depends on 𝑦𝑡. In this setting, the absence of an observation itself carries information about the latent state.

This has been discussed in the pymc main repo (https://github.com/pymc-devs/pymc/issues/8112), and it was suggested that this would fit well as a small example in pymc-examples. the goal would be a minimal, educational notebook focusing on the generative story, without relying on nan auto-imputation or proposing new api surface.

if there are no objections, Im happy to open a pr ,, the example is ready on my side.

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

Start by reading pymc issue #8112 and the existing notebooks in pymc-examples to understand how related examples are structured. Create a minimal educational notebook showing the coupled latent time series and missingness process, without nan auto-imputation or new API surface; done means the generative story is clearly demonstrated.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.