Skip to content
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

[DOC] WeakPDELibrary.transform does not produce output in shape specified by documentation. #442

Open
georgemilosh opened this issue Dec 19, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@georgemilosh
Copy link

So basically it is just doc string for class WeakPDELibrary(BaseFeatureLibrary): that seems to be inconsistent with the current setup. It says that lib.transform(x) would generate array of the same shape as the inpux x, but it is actually the sampled shape of x (which is governed by K). Also if I run this example with x that is 3 by 2 the command takes forever, so I changed it a bit:

Reproducing code example:

import numpy as np
from pysindy.feature_library import WeakPDELibrary

t = np.arange(0, 10, .5)
x = np.random.randint(0,3,(t.shape[0],2))
functions = [lambda x : np.exp(x), lambda x,y : np.sin(x+y)]
lib = WeakPDELibrary(library_functions=functions,spatiotemporal_grid=t,K=50).fit(x)
lib.transform(x).shape

So there is no error but it would help if more up to date doc strings and examples were provided.

PySINDy/Python version information:

0.1.dev1618+g694c904.d20231219 3.8.18 | packaged by conda-forge | (default, Oct 10 2023, 15:44:36) 
[GCC 12.3.0]
@Jacob-Stevens-Haas Jacob-Stevens-Haas added the good first issue Good for newcomers label Dec 19, 2023
@Jacob-Stevens-Haas Jacob-Stevens-Haas changed the title [BUG] [DOC] WeakPDELibrary.transform does not produce output in shape specified by documentation. Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants