Skip to content

Conversation

@crangelsmith
Copy link
Collaborator

As described in #185 adding functionality for time series generation.

The following models will be implemented:

Independently sampled from a distribution parametrised by population level statistics

  • E.g. sampling each event from N(mean_population, std_population).

Random walk with drift

A random walk with drift is one of the simplest time-series models, creating a smooth-ish stochastic trajectory.

$x_t = x_{t-1} + \delta + \varepsilon_t$

where:

  • $x_t$ = value at time (t)
  • $\delta$ = drift (average change per time step, the sign will tell you how the value is changing over time.)
  • $\varepsilon_t$= random noise, usually ($\mathcal{N}(0,\sigma_\varepsilon^2)$)

Autoregressive Model of Order 1- AR(1)

In an AR(1) model the value at the next time step depends on the current value plus a bit of random noise.

$x_t = \mu + \phi(x_{t-1} - \mu) + \varepsilon_t$

Where:

  • $x_t$ — the measurement at time (t)
  • $\mu$ — the average level (mean) of the series
  • $\phi$ — the autoregressive coefficient that controls how strongly the series depends on the previous value
  • $\varepsilon_t$ — random noise (usually Gaussian with mean 0)


def populate_blood_pressure_values(

def generate_paired_measurement(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@myyong, I've done some abstraction in this function. I didn't go too far, but it may be one step toward #184.

@myyong myyong merged commit 3d4ce3a into mimic Dec 3, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants