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

DMD with control cannot reconstruct data when provided with control #464

Open
lcstrang opened this issue Sep 25, 2023 · 0 comments
Open
Labels

Comments

@lcstrang
Copy link

Hi,

Beginner PyDMD user, so apologies if this is user-error.

The problem
DMD with control cannot reconstruct data if provided with a control input, even if the input is identical to the control used to fit.

Example
Code snippet:
dmdc = DMDc(svd_rank=0, opt=True).fit(X=train, I=control) dmdc.reconstructed_data(control).real

Expected behavior
Output of a reconstructed data matrix

Output
in DMDc.reconstructed_data(self, control_input) 274 arr = A.dot(data[i]) + self._B.dot(u) 275 if arr.shape != expected_shape: --> 276 raise ValueError( 277 f"Invalid shape: expected {expected_shape}, got {arr.shape}" 278 ) 279 data.append(arr) 281 data = np.array(data).T
ValueError: Invalid shape: expected (20592,), got (20592, 20592)
20592 matches the expected dimension of one time-step of the training data.

Additional context
The code performs as expected if I do not provide a control matrix

@lcstrang lcstrang added the bug label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant