Thriving Thriving Python PY
↑ 40 ?
StochasticForceInference ronceray/StochasticForceInference

Learn stochastic differential equations (Langevin dynamics: drift/force and diffusion) from time series and trajectory data. Python + JAX.

https://stochasticforceinference.readthedocs.io ↗
HEALTH ? 100 / Healthy
// hidden gem// legacy hero active-matterbiophysicscell-migrationdata-driven-modelingdrift-diffusionentropy-productionequation-discoveryfokker-planckjaxkramers-moyal ?

// readme

Stochastic Force Inference (SFI)

Learn the stochastic equation behind your time series.

SFI is a JAX-based Python package that infers the drift (force) and diffusion of Langevin stochastic differential equations from trajectories and other continuous time series: tracked particles, cells and animals, population abundances, gene-expression and other molecular levels, concentration fields. It returns an interpretable equation with error bars, selects the terms the data supports, and simulates the fitted model. It handles overdamped and underdamped dynamics, interacting particles and spatially extended (SPDE) systems.

Is SFI for my data?

You want to…SFI does it with
estimate drift and diffusion (first and second Kramers–Moyal coefficients, a Fokker–Planck model)OverdampedLangevinInference: infer_force_linear, infer_diffusion_linear
discover the equation of a noisy stochastic system (sparse regression, “stochastic SINDy”)a candidate basis + sparsify_force(criterion="PASTIS")
map forces and diffusivity from single-particle tracking, with localization errorthe overdamped engine; the defaults correct white localization noise