Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
temperature_effect = tfp.sts.LinearRegression(
design_matrix=tf.reshape(temperature - np.mean(temperature),
(-1, 1)), name='temperature_effect')
hour_of_day_effect = tfp.sts.Seasonal(
num_seasons=24,
observed_time_series=demand,
name='hour_of_day_effect')
day_of_week_effect = tfp.sts.Seasonal(
num_seasons=7,
num_steps_per_season=24,
observed_time_series=demand,
name='day_of_week_effect')
residual_level = tfp.sts.Autoregressive(
order=1,
observed_time_series=demand, name='residual')
model = tfp.sts.Sum([temperature_effect,
hour_of_day_effect,
day_of_week_effect,
residual_level],
observed_time_series=demand)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.