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.

TFTHyperparams

chronax.models.tft_model.TFTHyperparams · inherits PydanticBaseModel

Tunable training knobs; defaults favor shorter wall-clock on GPU Batch jobs.

Attributes

Attribute 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 throughput until memory-bound.

TFTModel

chronax.models.tft_model.TFTModel · 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) -> TFTModel

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: TFTModel (the fitted model).

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