You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In accordance with the second entry of the roadmap, I'm preparing to upload DMD with centering to PyDMD.
This refers to a very simple preprocessing step that involves performing mean subtraction to data before applying DMD. Basically, it has been shown that this is very helpful in the event that the input data does not possess mean zero since DMD fits a model $Y=AX$ as opposed to a model $Y=AX+b$ with a bias term $b$. Hence it can be advantageous to first subtract the mean from the data, fit a DMD model, and then incorporate the mean back in later. I also have a very short tutorial on standby that demonstrates the advantages of using DMD with centering as opposed to without centering.
I can see this feature being implemented one of two ways:
We add a new flag called center to the DMDBase class, which executes DMD with centering whenever centering=True. This would be pretty straightforward to implement since centering=True would only require computing and storing the mean of the input data so that fit can be applied to the centered data, and so that the mean can be re-incorporated into data reconstructions. The only issue is that this may painstakingly require touching all/most of the module initialization methods.
We build a .py file that houses data preprocessing tools. We could then build a simple preprocessing function called center which, given a data matrix X, computes and returns the mean-subtracted data matrix and the computed mean values. The centered data may then be used as input to the fit method of the DMD modules, and the computed mean values can be handled by users manually. This would be extremely easy to implement, however it would make it so that users would have to import an extra function and re-incorporate means into reconstructions themselves.
If anyone has any input on which implementation approach they'd prefer, please let me know! All feedback is welcome. :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi @fandreuz @mtezzele @ndem0 !
In accordance with the second entry of the roadmap, I'm preparing to upload DMD with centering to PyDMD.
This refers to a very simple preprocessing step that involves performing mean subtraction to data before applying DMD. Basically, it has been shown that this is very helpful in the event that the input data does not possess mean zero since DMD fits a model$Y=AX$ as opposed to a model $Y=AX+b$ with a bias term $b$ . Hence it can be advantageous to first subtract the mean from the data, fit a DMD model, and then incorporate the mean back in later. I also have a very short tutorial on standby that demonstrates the advantages of using DMD with centering as opposed to without centering.
I can see this feature being implemented one of two ways:
center
to theDMDBase
class, which executes DMD with centering whenevercentering=True
. This would be pretty straightforward to implement sincecentering=True
would only require computing and storing the mean of the input data so thatfit
can be applied to the centered data, and so that the mean can be re-incorporated into data reconstructions. The only issue is that this may painstakingly require touching all/most of the module initialization methods..py
file that houses data preprocessing tools. We could then build a simple preprocessing function calledcenter
which, given a data matrixX
, computes and returns the mean-subtracted data matrix and the computed mean values. The centered data may then be used as input to thefit
method of the DMD modules, and the computed mean values can be handled by users manually. This would be extremely easy to implement, however it would make it so that users would have to import an extra function and re-incorporate means into reconstructions themselves.If anyone has any input on which implementation approach they'd prefer, please let me know! All feedback is welcome. :)
Beta Was this translation helpful? Give feedback.
All reactions