简体   繁体   中英

Handling Missing Data in RNN / LSTM (Time-Series)

As the title suggests, I have a time-series data set and there is a lot of missing data. What is the best way to handle this for a LSTM model?

To give further detail, I have about five data sources to create the dataset and some of them do not allow me to get historical data so I'm missing quite a bit for the features in that source. I can fill some in using the most recently observed sample, but for the most part that isn't possible.

Some suggestions I have seen are:

  • Hidden Markov Modeling
  • Expectation Maximization
  • Using a neural net to predict the missing values

But for all I feel like I will be losing a lot of data integrity. How is this usually handled / what is the best way to adjust for this in LSTM models?

I'm using Python / Keras / TensorFlow.

Maybe masking at the top layer of your model could help.

For each timestep in the input tensor (dimension #1 in the tensor), if all values in the input tensor at that timestep are equal to mask_value, then the timestep will be masked (skipped) in all downstream layers (as long as they support masking).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM