-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help] Identify PDE by svd #434
Comments
The following is my code snapshot: load data and svdx = x.transpose([0,2,1]).reshape(n_elemn_var,tsize) # state vectors: origin shape (n_elem, tsize, n_var) shape: n_elemn_var, tsize change to new basisr = 6 # Truncate the first 6 modes train_time = 3000 plot pareto curvepoly_library = ps.PolynomialLibrary(degree=poly_order) for i, threshold in enumerate(threshold_scan): plot_pareto(coefs, sparse_regression_optimizer, model, |
The only thing I notice about your code is that, when fitting an SVD, you should just use the right singular vectors. I.e. in You want to fit I don't know what It generally helps to make sure your code works on a simple, known problem (like the heat equation) if something isn't working with custom data. This identifies if the problem is truly idiosyncratic to your data or just a coding error. |
Thank you for your prompt response. I appreciate your suggestion to fix the code for a simple and well-known problem. Do you know any good examples, such as papers, codes, or tutorials, that demonstrate the use of SVD and addressing modes with SINDy?I really appreciate for your sharing. Thank you so much for the help. |
Try the examples folder here. Alternatively, you can simulate a 1D heat equation as an ODE by using the fourier transform. See an example in the tests of this repo |
@Jacob-Stevens-Haas. Thank you so much! |
Hi there. I am a beginner for PySindy. I am currently working on identifying a nonlinear partial differential equation (PDE). The state vector x contains 10 physical variables in a 1D spatial grid with 40 discrete points. Since the number of variables is large, I am using singular value decomposition (SVD) to capture the first 6 modes as basis vectors for my new coordinate system. By converting my data to this new basis, I aim to solve the equation. However, when I plot the Pareto curve, I observe that the error decreases as the threshold lambda increases. Moreover, the error becomes significantly large. Does anyone have any suggestions on how to solve these problems?
Thanks in advance.
The text was updated successfully, but these errors were encountered: