All Projects → gszep → BifurcationInference.jl

gszep / BifurcationInference.jl

Licence: MIT license
learning state-space targets in dynamical systems

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to BifurcationInference.jl

Pontryagin-Differentiable-Programming
A unified end-to-end learning and control framework that is able to learn a (neural) control objective function, dynamics equation, control policy, or/and optimal trajectory in a control system.
Stars: ✭ 111 (+362.5%)
Mutual labels:  dynamical-systems, differentiable-programming
BifurcationKit.jl
A Julia package to perform Bifurcation Analysis
Stars: ✭ 185 (+670.83%)
Mutual labels:  continuation, pseudo-arclength-continuation
sssMOR
sssMOR - Sparse State-Space and Model Order Reduction Toolbox
Stars: ✭ 20 (-16.67%)
Mutual labels:  state-space, dynamical-systems
awesome-nn-optimization
Awesome list for Neural Network Optimization methods.
Stars: ✭ 39 (+62.5%)
Mutual labels:  continuation, dynamical-systems
pomp
R package for statistical inference using partially observed Markov processes
Stars: ✭ 88 (+266.67%)
Mutual labels:  state-space, dynamical-systems
future.scala
Stack-safe asynchronous programming
Stars: ✭ 38 (+58.33%)
Mutual labels:  continuation
NonlinearDynamicsTextbook
Nonlinear Dynamics: A concise introduction interlaced with code
Stars: ✭ 145 (+504.17%)
Mutual labels:  dynamical-systems
cpsfy
🚀 Tiny goodies for Continuation-Passing-Style functions, fully tested
Stars: ✭ 58 (+141.67%)
Mutual labels:  continuation
pymor
pyMOR - Model Order Reduction with Python
Stars: ✭ 198 (+725%)
Mutual labels:  state-space
Helicopter-Simulation
A complete 6DOF helicopter simulation (physics engine + visualization)
Stars: ✭ 45 (+87.5%)
Mutual labels:  state-space
KFAS
KFAS: R Package for Exponential Family State Space Models
Stars: ✭ 50 (+108.33%)
Mutual labels:  state-space
pressio
Model reduction for linear and nonlinear dynamical systems: core C++ library
Stars: ✭ 35 (+45.83%)
Mutual labels:  dynamical-systems
MultiKDE.jl
Multivariate kernel density estimation
Stars: ✭ 30 (+25%)
Mutual labels:  kernel-density-estimation
wham
State-space, age-structured fish stock assessment model
Stars: ✭ 25 (+4.17%)
Mutual labels:  state-space
KernelDensity.jl
Kernel density estimators for Julia
Stars: ✭ 145 (+504.17%)
Mutual labels:  kernel-density-estimation
SDETools
Matlab Toolbox for the Numerical Solution of Stochastic Differential Equations
Stars: ✭ 80 (+233.33%)
Mutual labels:  dynamical-systems
DiffOpt.jl
Differentiating convex optimization programs w.r.t. program parameters
Stars: ✭ 106 (+341.67%)
Mutual labels:  differentiable-programming
eom
Configurable ODE/PDE solver
Stars: ✭ 50 (+108.33%)
Mutual labels:  dynamical-systems
MongeAmpereFlow
Continuous-time gradient flow for generative modeling and variational inference
Stars: ✭ 29 (+20.83%)
Mutual labels:  dynamical-systems
BrainPy
Brain Dynamics Programming in Python
Stars: ✭ 242 (+908.33%)
Mutual labels:  dynamical-systems

BifurcationInference.jl

This library implements the method described in Szep, G. Dalchau, N. and Csikasz-Nagy, A. 2021. Parameter Inference with Bifurcation Diagrams using parameter continuation library BifurcationKit.jl and auto-differentiation ForwardDiff.jl. This implementation enables continuation methods can be used as layers in machine learning proceedures, and inference can be run end-to-end directly on the geometry of state space.

Build Status Coverage arXiv

Basic Usage

The model definition requires a distpatched method on F(z::BorderedArray,θ::AbstractVector) where BorderedArray is a type that contains the state vector u and control condition p used by the library BifurcationKit.jl. θ is a vector of parameters to be optimised.

using BifurcationInference, StaticArrays

F(z::BorderedArray::AbstractVector) = F(z.u,(θ=θ,p=z.p))
function F(u::AbstractVector,parameters::NamedTuple)

	@unpack θ,p = parameters
	μ₁,μ₂, a₁,a₂, k = θ

	f = first(u)*first(p)*first(θ)
	F = similar(u,typeof(f))

	F[1] = ( 10^a₁ + (p*u[2])^2 ) / ( 1 + (p*u[2])^2 ) - u[1]*10^μ₁
	F[2] = ( 10^a₂ + (k*u[1])^2 ) / ( 1 + (k*u[1])^2 ) - u[2]*10^μ₂

	return F
end

The targets are specified with StateSpace( dimension::Integer, condition::AbstractRange, targets::AbstractVector ). It contains the dimension of the state space, which must match that of the defined model, the control condition range that we would like to perform the continuation method in, and a vector of target conditions we would like to match.

X = StateSpace( 2, 0.01:0.01:10, [4,5] )

The optimisation needs to be initialised using a NamedTuple containing the initial guess for θ and the initial value p from which to begin the continuation.

using Flux: Optimise
parameters = ( θ=SizedVector{5}(0.5,0.5,0.5470,2.0,7.5), p=minimum(X.parameter) )
train!( F, parameters, X;  iter=200, optimiser=Optimise.ADAM(0.01) )
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].