[ANN] DataDrivenDiffEq.jl - Overhauled in 0.6.0

I’d like to finally and officially announce the DataDrivenDiffEq.jl, a package in the SciML ecosystem for the structural estimation and inference of nonlinear differential equations.

The main features include:

  • Dynamic Mode Decomposition ( in all of the flavours for discrete, extended, continuous and controlled systems )
  • Sparse Identification of Nonlinear Dynamics ( explicit + implicit with or without controls)
  • Tight integration with ModelingToolkit and the SciML ecosystem

This is already the v0.6.0 release, but really the first one which feels like a sufficient release for me personally. A quick copy and paste example, taken from the Readme:

## Generate some data by solving a differential equation
########################################################
using DataDrivenDiffEq
using ModelingToolkit
using OrdinaryDiffEq

using LinearAlgebra

# Create a test problem
function lorenz(u,p,t)
    x, y, z = u

    ẋ = 10.0*(y - x)
    ẏ = x*(28.0-z) - y
    ż = x*y - (8/3)*z
    return [ẋ, ẏ, ż]
end

u0 = [1.0;0.0;0.0]
tspan = (0.0,100.0)
dt = 0.1
prob = ODEProblem(lorenz,u0,tspan)
sol = solve(prob, Tsit5(), saveat = dt, progress = true)


## Start the automatic discovery 
# This just collects the state and derivative information
ddprob = ContinuousDataDrivenProblem(sol)

@variables t x(t) y(t) z(t)
u = [x;y;z]
basis = Basis(polynomial_basis(u, 5), u, iv = t)
opt = STLSQ(exp10.(-5:0.1:-1))
ddsol = solve(ddprob, basis, opt, normalize = true)
print(ddsol, Val{true})

which results in

Explicit Result
Solution with 3 equations and 7 parameters.
Returncode: sucess
Sparsity: 7.0
L2 Norm Error: 26.7343984476783
AICC: 1.0013570199499398

Model ##Basis#366 with 3 equations
States : x(t) y(t) z(t)
Parameters : 7
Independent variable: t
Equations
Differential(t)(x(t)) = p₁*x(t) + p₂*y(t)
Differential(t)(y(t)) = p₃*x(t) + p₄*y(t) + p₅*x(t)*z(t)
Differential(t)(z(t)) = p₇*z(t) + p₆*x(t)*y(t)

Parameters:
   p₁ : -10.0
   p₂ : 10.0
   p₃ : 28.0
   p₄ : -1.0
   p₅ : -1.0
   p₆ : 1.0
   p₇ : -2.7

I am looking forward to getting issues, feature and maybe even pull requests :wink:

17 Likes