5 Approaches to Impute Missing Data in Time Series

Ning Jia
8 min readJan 10, 2023

Missing data is a common problem in real-world datasets. If you’ve ever wondered how to handle missing values in time series data effectively, this post is for you! I will introduce five approaches for imputing missing values in time series data.

I’ll focus on univariate time series most time. We can impute each time series individually for handling missing values in multivariate time series. The last approach will consider the interaction of multiple time series and impute multivariate time series well.

The link to the code is in the final reference section.

Introduction

First, there is not much discussion online on time series imputation. I think the main reasons are:

1. Imputation is not our primary target generally. Imputation is typically part of the preprocessing step, and its purpose is to make the data ready to solve the main goals such as classification, forecasting, clustering, etc.

2. Imputation is only sometimes necessary. Some machine learning algorithms can handle missing values well. Moreover, we can build features indicating missing values, like the ratio of the missing data in the rolling observation windows.

3. When it comes to imputing missing values in time series data, there can be a dilemma. If the amount of missing data is small, like just a few observations, then it might be enough to fill in the missing values with the previous…

--

--