-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Hello! I want to train a DMDc model,
and the time-shifted copy:
For regular DMD, this works fine, since the method allows you to explicitly write:
model = DMD().fit(X, Xprime) or model = DMD().fit(X, Y=Xprime)
However for DMDc, I don't know how to train the model on the same shuffled data, given the shuffled input vector:
since DMDc only allows the following inputs:
model = DMDc().fit(snapshots, inputs)
Is this not possible with DMDc? Or could this functionality be added? So we could write:
model = DMDc().fit(X, inputs, Y=Xprime)
Thanks!
PS: I made a quick edit to the dmdc.py file at lines 314-317 that seems to fix this, but it may need an adjustment if lag=/=1. It also requires
def fit(self, X, I, B=None, Y=None):
...
if Y is None:
X = self.snapshots[:, : -self._lag]
Y = self.snapshots[:, self._lag :]
else:
self._compare_data_shapes(Snapshots(Y).snapshots)
self._snapshots_holder_y = Snapshots(Y)
X = self.snapshots
Y = self.snapshots_y