trend_model#
- tfts.layers.nbeats_layer.trend_model(theta: Tensor, t_b: Tensor, t_f: Tensor, polynomial_size: int) Tuple[Tensor, Tensor][source]#
Generate the trend backcast and forecast using polynomial basis functions.
- Parameters:
theta (tf.Tensor) – Basis expansion coefficients
t_b (tf.Tensor) – Input time index for backcast
t_f (tf.Tensor) – Output time index for forecast
polynomial_size (int) – Number of polynomial terms
- Returns:
A tuple of (backcast, forecast) tensors
- Return type:
Tuple[tf.Tensor, tf.Tensor]