# In DataDrivenDiffEq, how to get SINDy results as an array of numeric coefficients?

**URL:** <https://discourse.julialang.org/t/in-datadrivendiffeq-how-to-get-sindy-results-as-an-array-of-numeric-coefficients/108449>\
**Category:** Modelling & Simulations\
**Tags:** differentialequation, sindy\
**Created:** [January 6, 2024, 11:37pm UTC](https://discourse.julialang.org/t/in-datadrivendiffeq-how-to-get-sindy-results-as-an-array-of-numeric-coefficients/108449 "2024-01-06T23:37:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kmd/32/212868_2.png) [@kmd](https://discourse.julialang.org/u/kmd)\
**Post date:** [January 6, 2024, 11:37pm UTC](https://discourse.julialang.org/t/in-datadrivendiffeq-how-to-get-sindy-results-as-an-array-of-numeric-coefficients/108449/1 "2024-01-06T23:37:27Z")

</div>

Hi,  
I would like to obtain the result of a SINDy model fitting as an array of coefficients I can convert to Float64. I can do this in PySINDy with the function ``model.coefficients()‘’, which will return the weights in order corresponding to each basis function.

I can’t find out from the documentation or any examples I searched for on Github how to do this in DataDrivenSparse; for example, let’s say I assign the solution of a DataDrivenProblem to a variable called `results''. If I use `get\_basis(results)‘’ it returns the Basis Object, but then if I do ``parameters(get\_basis(results))‘’ I get some weird array of symbols, not the actual numbers. Does anyone know the correct routine?

---

<div class="post-metadata">

**Author:** ![kmd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kmd/32/212868_2.png) [@kmd](https://discourse.julialang.org/u/kmd)\
**Post date:** [January 7, 2024, 1:56pm UTC](https://discourse.julialang.org/t/in-datadrivendiffeq-how-to-get-sindy-results-as-an-array-of-numeric-coefficients/108449/2 "2024-01-07T13:56:08Z")

</div>

I just figured this out; one can use get\_parameter\_values(basis).
