Note this code is research code used to test a models performance on a benchmark dataset. This is not optimized or designed for production/industry applications. I simply post it here as it may help others understand my research or the topics presented here.
A Dynamical Variational Autoencoder (DVAEs) that is trained using a Kalman filter (as opposed to an ELBO-based loss). This is applied to the CMAPSS turbofan engine dataset from NASA for Remaining Useful Life (RUL) estimation using sensor signals as inputs (data can be found in this repository or here under header 6. Turbofan Engine Degradation Simulation). The code here was used in my PhD thesis (Degradation Vector Fields with Uncertainty Considerations). The code here is based on Chapter 7 of the thesis. There is a notebook that goes through a simple use case of the model for RUL estimation. This may be easier to understand than the training and testing scripts whose arguments try to account for many different cases the user may want to test.
The training and testing scripts allow one to train and test models from the command line using arguments to perform different tests on a variety of sub-models used to construct a Kalman-DVAE (K-DVAE).
The main idea behind the K-DVAE is to use DVAE models to estimate the RUL given sensor signals; as is done in my other repository.
However, with the K-DVAE we realize that the RUL target values are linear (it decays linearly to zero from the current time point), and so we could use a Kalman filter to find the marginal likelihood
Hence, in the DVAE we introduced transition and measurement models. In the K-DVAE these are linear Gaussian state space models so that they are compatible with the Kalman filter.
Transition:
Measurement:
where