Skip to content

Instantly share code, notes, and snippets.

@davmre
Created March 4, 2019 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davmre/d7472ca4796eb5ec04da94b7ccce86d7 to your computer and use it in GitHub Desktop.
Save davmre/d7472ca4796eb5ec04da94b7ccce86d7 to your computer and use it in GitHub Desktop.
Structural Time Series model of monthly atmospheric CO2 data from Mauna Loa
import tensorflow_probability as tfp
trend = tfp.sts.LocalLinearTrend(observed_time_series=co2_by_month)
seasonal = tfp.sts.Seasonal(
num_seasons=12, observed_time_series=co2_by_month)
model = tfp.sts.Sum([trend, seasonal], observed_time_series=co2_by_month)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment