SciML / DataDrivenDiffEq.jl

Data driven modeling and automated discovery of dynamical systems for the SciML Scientific Machine Learning organization
https://docs.sciml.ai/DataDrivenDiffEq/stable/
MIT License
406 stars 57 forks source link

Result printing of Quick Demonstration in README.md is not reproduced #464

Closed dsryu0822 closed 1 year ago

dsryu0822 commented 1 year ago

In mine:

julia> println(get_basis(ddsol))
Model ##Basis#345 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)

julia> 

In example:

Explicit Result
Solution with 3 equations and 7 parameters.
Returncode: success
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 could figure out how to get the parameters, by ddsol.out[1].coefficients, but maybe I need above result.

AlCap23 commented 1 year ago

Ah, I need to update that.

You can also use get_parameter_map on the resulting basis.