TotoHyperparams
chronax.models.toto_model.TotoHyperparams · inherits PydanticBaseModel
Foundation model with minimal parameters
TotoModel
chronax.models.toto_model.TotoModel · inherits BaseModel
__init__(self, params: Dict[str, Any], settings: Dict[str, Any])
Initialize TOTO model with configuration.
| 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: dict) -> "TotoModel"
Train/fine-tune the foundation model on given data. For TOTO, this is a pre-trained model that doesn't require additional training. This method sets the fitted flag and returns the model.
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | Past target values |
y_target |
np.ndarray |
- | Future target values (not used for pre-trained model) |
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 |
dict |
- | (undocumented) |
Returns: Self (The fitted model instance).
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: dict) -> np.ndarray
Make predictions using the trained TOTO model.
| Parameter | Type | Default | Description |
|---|---|---|---|
y_context |
np.ndarray |
- | Recent/past target values |
timestamps_context |
np.ndarray |
- | Timestamps for the context data |
timestamps_target |
np.ndarray |
- | Timestamps for the target data |
x_context |
Optional[np.ndarray] |
None |
(undocumented) |
x_target |
Optional[np.ndarray] |
None |
(undocumented) |
**kwargs |
dict |
- | (undocumented) |
Returns: np.ndarray (Model prediction samples with shape (num_samples, forecast_horizon, num_targets)).
freq_to_seconds(self, freq: Union[str, float, int]) -> float
Delegate to :func:~\tempus_bench.models.toto.freq_seconds.freq_to_seconds.
| Parameter | Type | Default | Description |
|---|---|---|---|
freq |
Union[str, float, int] |
- | (undocumented) |
Returns: float.