SingleEvalSamplePayload
Parameters
sample_id
Type:Any
Unique identifier for the sample. Can be any hashable type. This will become a column in the output dataframe.
history_timestamps
Type:List[str]
List of timestamp strings for historical data points. Must be in ISO format or compatible with pandas datetime parsing.
history_values
Type:List[Optional[float]]
List of historical values corresponding to history_timestamps. None values represent missing data points.
target_timestamps
Type:List[str]
List of timestamp strings for target (future) data points. Must be in ISO format or compatible with pandas datetime parsing.
target_values
Type:List[Optional[float]]
List of target values corresponding to target_timestamps. None values represent missing data points.
forecast
Type:bool
Default: True
Whether this sample should be used for forecasting. If False, the sample is used for metadata only.
metadata
Type:bool
Default: False
Whether this sample contains metadata information. Metadata samples are not forecasted but provide context.
leak_target
Type:bool
Default: False
Whether this sample contains target leakage. Leakage samples should be excluded from training to prevent data leakage in model evaluation.
column_name
Type:str or None
Default: None
Name of the column this sample represents. Used for identification in multi-column datasets.
Raises
ValueError
- If timestamps or values lists are empty
- If history and target data have mismatched lengths
- If values contain NaN that cannot be converted to None
Notes
- All timestamp lists must be non-empty
- NaN values in history_values and target_values are converted to None for JSON serialization compatibility
- Each sample represents one time series column in a forecasting scenario
- Samples with leak_target=True should be excluded from training data
Examples
Basic Forecast Sample
Metadata Sample with Missing Values
Sample with Target Leakage
See Also
- ForecastV2Request : Container for multiple evaluation samples
- SingleSampleForecastPayload : Forecast output for a single sample