-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feature: State Weighted eDMD (SW-eDMD) #88
Conversation
Great, Thank you! @EthanJamesLew |
It seems the issue isn't just for a low number of trajectories, but in general when sw-edmdc fails to find a solution, which may be related to limited data. @EthanJamesLew |
@Abdu-Hekal I can certainly present an error for that. However, would it be better to present a warning and switch to unweighted eDMD? |
@EthanJamesLew Yes I agree! Is this issue simply inherent due to the approach, where it just fails to find a reasonable solution due to limited data? |
@Abdu-Hekal I will investigate... Also, I have another idea for reweighting--to move some of the reweighting to the RFFs in addition to the DMD stage. I will attend to this and then play with reweighting the observables directly (data-adaptive). |
Perfect! @EthanJamesLew |
@Abdu-Hekal added regularization for the sparse data case. I think it's ready to try now. |
@EthanJamesLew Great! No errors now. The fit for the weighted approach though seems to be much worse. For reference I am attaching two images, one with weighting and one without for learning the Automatic transmission model with 1 training trajectory. I am using a weight of one for all point so the result is expected to be the same. The poorly learnt model with weighting reminds of issues with normalization, is there something similar going on here? |
@Abdu-Hekal I can guess what's going on (large state values cause numerical instability during optimization). However, to avoid wasting your time, can you please see me a couple of those trajectories so that I can test them on my machine. A simple CSV or mat file will do. Thanks |
@EthanJamesLew Sent them, Thank you! |
add __init__.py to create the observable submodule
use the pinv if inv fails
fix extracting A and B matrices
add clipping to sensitivities
@EthanJamesLew Maybe we should investigate the discrepancy when using different weights, where weights are the same for all points and all trajectories. We should ideally expect the same results if all weights are equal. Whilst using a weight of 1e-4 no explosion in values occurs, falsification results are much worse for the majority of benchmarks. Using a weight of 1 seems to give comparable results to non-weighted, despite very bad learning for a trainset of 1-2 trajectories, as it stabilizes later on. Maybe we could investigate different solvers as well, which might also help reduce runtime. |
change to rank adaptation problem for sw-edmd modify weighted cost func for new rank values
@Abdu-Hekal I changed SW-eDMD to use rank adaptation. It now performs better on the sparsity examples that I tested |
Summary
This is an implementation of our novel eDMD algorithm that allows states and snapshots to be weighted. A conversion is done in the objective to translate weights on state to weights on observables.
weighted-cost-func.ipynb
has a complete example of the methodCC @Abdu-Hekal