SingleSampleForecastPayload
Parameters
sample_id
Type:Any
Unique identifier for the sample. Must match the input sample_id.
timestamps
Type:List[str]
List of timestamp strings for the forecasted values. Must be in ISO format or compatible with pandas datetime parsing.
values
Type:List[Optional[float]]
List of forecasted values corresponding to timestamps. None values represent missing or invalid forecasts.
model_name
Type:str
Name of the model used to generate the forecast. Must be a non-empty string.
quantiles
Type:Optional[dict[str, List[Optional[float]]]] Default: None
Optional quantile forecasts. Keys are quantile levels as strings (e.g., “0.1”, “0.5”, “0.9”), and values are lists of forecasted values at that quantile level. When provided, each quantile list must have the same length as timestamps.
Raises
ValueError
- If timestamps or values lists are empty
- If timestamps and values have mismatched lengths
- If model_name is empty or whitespace
Notes
- NaN values in values are converted to None for JSON compatibility
- model_name is automatically trimmed of whitespace
- Each forecast represents predictions for one time series column
- When quantiles are provided, they are excluded from JSON output when None
- Quantile values are also converted from NaN to None for JSON compatibility
Examples
Basic Forecast
Forecast with Missing Values
Forecast with Quantiles
See Also
- SingleEvalSamplePayload : Input sample for forecasting
- ForecastV2Response : Container for multiple forecast results