0

I have a few years worth of temperature data that is often sampled every ~20 minutes, but there are also gaps, could be many days of gaps, although more commonly an hour or two. I thought to use Prophet and ask it to interpolate the missing data.Interpolant

Result is above. It recognizes the daily seasonality but is not really attempting to match daily variation. This is with

model = Prophet(daily_seasonality=False)  
model.add_seasonality(name='daily', period=1, fourier_order=20)  # Add custom daily seasonality

Are there some other parameters that I could tweak to encourage a better fit with existing data?

Thanks,

Tunneller
  • 141
  • 3

1 Answers1

1

I was able to simultaneously detrend the timeseries and interpolate the missing data by assuming a periodic function F(t) defined by 16 spline points over the course of just one day and then L2-minimizing difference against A(t)*F(t-T(t))+B(t) where A(t), T(t) and B(t) were splines with knots at midnight and noon each day. I used scipy PchipInterpolator rather than traditional cubic splines.

Interpolated data

So I suppose this functional is similar to what Prophet minimizes [although it uses Fourier terms for F(t)] but I have more flexibility in defining a trend. Or the opposite, I'm not positing a trend in the A(t), B(t) at all.

Tunneller
  • 141
  • 3