Constructing an LSTM Network for Time Series

In this chapter, we will discuss how to construct a long short-term memory (LSTM) neural network to solve a medical time series problem. We will be using data from 4,000 intensive care unit (ICU) patients. Our goal is to predict the mortality of patients using a given set of generic and sequential features. We have six generic features, such as age, gender, and weight. Also, we have 37 sequential features, such as cholesterol level, temperature, pH, and glucose level. Each patient has multiple measurements recorded against these sequential features. The number of measurements taken from each patient differs. Furthermore, the time between measurements also differs among patients.

LSTM is well-suited to this type of problem due to the sequential nature of the data. We could also solve it using a regular recurrent neural network (RNN), but the purpose of LSTM is to avoid vanishing and exploding gradients. LSTM is capable of capturing long-term dependencies because of its cell state.

In this chapter, we will cover the following recipes:

  • Extracting and reading clinical data
  • Loading and transforming data
  • Constructing input layers for a network
  • Constructing output layers for a network
  • Training time series data
  • Evaluating the LSTM network's efficiency

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset