# Using @parameters with DataDrivenDiffEq

**URL:** <https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520>\
**Category:** General Usage\
**Created:** [December 11, 2022, 1:00am UTC](https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520 "2022-12-11T01:00:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Post date:** [December 11, 2022, 1:00am UTC](https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520/1 "2022-12-11T01:00:47Z")

</div>

I have figured out how to fit functions defined by arrays of number using a Basis defined with `ModelToolkit.jl` and `DataDrivenDiffEq.jl`. However, I still do not understand the use of `@parameters`. I initially thought that it would allow me to parameterize the basis functions, but I do not think that is the case.

My question is whether it would be possible to define a basis function to be `sin(p*u)` and run a variant of SINDY that would not only fit the function to the basis function but also provide a best estimate of `p`. This would require coupling SINDY with a neural net optimizer. Has anybody done this?

Thanks!

```
Gordon

```

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [December 11, 2022, 2:35am UTC](https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520/2 "2022-12-11T02:35:17Z")

</div>

It always provides and estimate of `p`. Remind me in a few days and we’ll have a new tutorial up that highlights this. The new deployment machine just isn’t working right now.

---

<div class="post-metadata">

**Author:** ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Post date:** [December 11, 2022, 2:54am UTC](https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520/3 "2022-12-11T02:54:20Z")

</div>

Great! I’ll remind you.

---

<div class="post-metadata">

**Author:** ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Post date:** [January 12, 2023, 6:58pm UTC](https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520/4 "2023-01-12T18:58:29Z")

</div>

Hi @ChrisRackauckas ,

Consider yourself reminded :-), concerning parameter estimation. See last 2-3 messages. Cheers,

Gordon

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 29, 2023, 12:33pm UTC](https://discourse.julialang.org/t/using-parameters-with-datadrivendiffeq/91520/5 "2023-01-29T12:33:15Z")

</div>

IIUC this is shown in [Automatically Discover Missing Physics by Embedding Machine Learning into Differential Equations · Overview of Julia's SciML](https://docs.sciml.ai/Overview/stable/showcase/missing_physics/), showing how to use the result and change parameters etc. If there’s anything more you’d like to see in the post analysis we can probably add it there.

We probably need some more docs on this (note @Julius_Martensen).

The other examples from the paper are coming to the SciMLSensitivity docs rather soon.
