Numerical differentiation and Improvements to RNN #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all, here is some additional work on the Kato "pipeline" and recurrent neural networks.
Kato pipeline
Analyzer
method:tvd
Note: I am quite unfamiliar with the technique developed by Chartrand and used in this off-the-shelf script. Nonetheless I am trying to use it here to see if we can reproduce Kato's analysis.
In this image from the Jupyter notebook, you see Kato's raw data, Kato's derivative data, and our PCA on Kato's derivative data; followed by Kato's raw data, our computation of the derivative, and our computation of PCA on our derivative data.
RNNs
when attempting to fit the model.
Much of the code is taken directly from @jrieke's implementation here - thank you for allowing me to use your GMM functions as I try to make this work.
I tried various configurations of the model, with and without a
stateful
LSTM layer, feeding in 1 data point at a time vs longer chunks, changing the number ofmixture_components
, changing the learning rate, using different optimizers, but to no avail -- still getting NaNs. As I am new to RNNs, and in particular don't understand all of the GMM code, I may be making an egregious error in how I'm using the model, or it might be a more subtle problem.A demo of how I am using the model can be found at laboratory/RNNDemo.ipynb
Next steps
My goal is to get the RNN working, and then add a 3rd row to the image above, in which we compare data we generate from the RNN, differentiate, and then perform PCA on. In this way, we would reproduce Kato's analysis using Kato's own data, and also do a similar analysis using data that we generate. Future analyses and simulations could take a similar approach -- analyze the Kato data using some tool we build, generate similar data with a simulation, and then use the same analytic pipeline to compare our generated data to Kato's.