I published on GitHub a tutorial on how to implement an algorithm for predictive maintenance using survival analysis theory and gated Recurrent Neural Networks in Keras.
The tutorial is divided into:
- Fitting survival distributions and regression survival models using lifelines.
- Predicting the distribution of future time-to-failure using raw time-series of covariates as input of a Recurrent Neural Network in keras.
The second part is an extension of the wtte-rnn framework developed by @ragulpr. The original work focused on time-to-event models for churn predictions while we will focus on the time-to-failure variant.
In a time-to-failure model the single sequence will always end with the failure event while in a time-to-event model each sequence will contain multiple target events and the goal is to estimating when the next event will happen. This small simplification allows us to train a RNN of arbitrary lengths to predict only a fixed event in time.
The tutorial is a also a re-adaptation of the work done by @daynebatten on predicting run to failure time of jet engines.
The approach can be used to predict failures of any component in many other application domains or, in general, to predict any time to an event that determines the end of the sequence of observations. Thus, any model predicting a single target time event.
You can find the rest of the tutorial at https://github.com/gm-spacagna/deep-ttf/.