Esc
Ask AIAnswers may be inaccurate; check the linked pages.Esc
Ask anything about these docs, like how to get started or what a function does.

NBEATSHyperparams

nbeats_model.NBEATSHyperparams · inherits PydanticBaseModel

Tunable training knobs; aligned with TFT / shorter training.

Attributes

Parameter Type Default Description
input_size int 128 NeuralForecast input_size (lookback).
max_steps int 25 Lightning optimization steps per fit (not forecast horizon; tasks cap h at 128).
batch_size int 64 Minibatch size (series per step); larger improves GPU/CPU throughput until memory-bound.

NBEATSModel

nbeats_model.NBEATSModel · inherits BaseModel

__init__(self, params: Dict[str, Any], settings: Dict[str, Any])

Parameter Type Default Description
params Dict[str, Any] - (undocumented)
settings Dict[str, Any] - (undocumented)

train(self, y_context: np.ndarray, y_target: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs) -> NBEATSModel

Parameter Type Default Description
y_context np.ndarray - (undocumented)
y_target np.ndarray - (undocumented)
timestamps_context np.ndarray - (undocumented)
timestamps_target np.ndarray - (undocumented)
x_context Optional[np.ndarray] None (undocumented)
x_target Optional[np.ndarray] None (undocumented)
**kwargs - (undocumented)

Returns: NBEATSModel (the fitted forecaster).

predict(self, y_context: np.ndarray, timestamps_context: np.ndarray, timestamps_target: np.ndarray, x_context: Optional[np.ndarray] = None, x_target: Optional[np.ndarray] = None, **kwargs) -> np.ndarray

Parameter Type Default Description
y_context np.ndarray - (undocumented)
timestamps_context np.ndarray - (undocumented)
timestamps_target np.ndarray - (undocumented)
x_context Optional[np.ndarray] None (undocumented)
x_target Optional[np.ndarray] None (undocumented)
**kwargs - (undocumented)

Returns: np.ndarray (The forecast array). Raises: ValueError (if NBEATSModel is not fitted).