facebook / facebook/prophet

Using Prophet for Time Series gap imputation

Open
#2,436 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

Consider a regular hourly time series with a relatively long sequence of consecutive missing values or a gap.

I'm considering using Prophet for the following approach:
- Identify start and end of gap
- Apply linear interpolation
- Create a left and right window 2x the size of the gap
- Fit this series in Prophet (left window, center window or linear interpolated gap, right window)
- Predict the same period with Prophet

**Example**
Sample Dataset: ETTh1.csv
Corrupted series: 1000 hour gap
The plot of the result (original, corrupted, reconstructed)
![image](https://github.com/facebook/prophet/assets/55836583/aab07861-0e75-46e8-9c40-32bbf7648dbf)
MAE of linear interpolation: 2.79
MAE of Prophet: 2.44

**In theory does this approach make sense?**
Notebook: https://colab.research.google.com/drive/1w7y5ju0hnd0zLp6qTwmW7ukLgLozvW-b?usp=sharing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.