Skip to content

Discovering a simple PDE with noisy data -- need suggestion for specifying differentiation_method #292

Answered by znicolaou
Lawrence5 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @Lawrence5 & @akaptano ,

I tried this out of curiosity, and it almost worked for my environment. I think it'll work for you if you install pysindy from the current github repository, as in

git clone https://github.com/dynamicslab/pysindy.git
cd pysindy
pip install -r requirements-dev.txt

The only change I needed to make to your code was

# smoothed_fd = ps.SmoothedFiniteDifference(axis=1)._differentiate(u_train, t=dt)
smoothed_fd = ps.SmoothedFiniteDifference(axis=1)

since the differentiation_method takes an object of type BaseDifferentiation rather than the actual derivative values. You can also use method.fit(u_flat,t=dt,x_dot=ps.SmoothedFiniteDifference(axis=1)._differentiate(u_fl…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Lawrence5
Comment options

Comment options

You must be logged in to vote
2 replies
@Lawrence5
Comment options

@Lawrence5
Comment options

Answer selected by znicolaou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants