How do you solve missing values in a time series?

Anton Knight
Anton KnightAnswered

The development of Artificial intelligence and its subsets are not only taking over the global market and changing the way businesses operate, but also how individual people function daily. One of the most attractive advantages is highly valuable predictions thatmake decision-making easier and accurate. In order to deliver trustworthy data outcomes, Machine Learning models and datasets can’t afford missing values. It is one of the core tasks in the data preparation process, being a basic in Machine Learning dataset pre-processing. Data that is planned to be incorporated into the training dataset must be gathered from trustfull resources, unbiased, filtered, and in accordance with desirable data outcome preferences. Luckily, there are proven ways to handle missing values in time series. Methods used for the estimation of missing values in time series are:

  • Linear interpolation – Commonly used method for the estimation of missing values in time series. The estimation is done by connecting the dots in a strictly linear, increasing order.
  • Last observation forward – This method uses the data from the previous row to fill the missing value spot in the next.
  • Next observation backward – Here, the value from the next row will be used to fill the missing value.

It’s a common case of missing intermediate values in a time series and  are considered serious input flaws in time series. There are 2 ways to handle missing data:

  1. Ignore – Simply ignore/cut out the missing value spot, but be cautious about dealing with missing data this way as it can interrupt whole time series sampling.
  2. Interpolate – Replacing the missing values with interpolated.

Imputation replaces the missing data/values with the one observed from the environment but with the same underlying conditions as the missing one.

Testing. CI/CD. Monitoring.

Because ML systems are more fragile than you think. All based on our open-source core.

Our GithubInstall Open SourceBook a Demo

Subscribe to Our Newsletter

Do you want to stay informed? Keep up-to-date with industry news, the latest trends in MLOps, and observability of ML systems.