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.

Visualization utilities for the benchmarking pipeline.

Visualizer

chronax.visualizer.Visualizer

Creates visualizations for time series forecasting results. The Visualizer provides methods for prediction plots (Matplotlib) and logging forecast comparisons to TensorBoard as scalar series (no PNGs).

__init__(self)

Initializes the Visualizer, setting Matplotlib and Seaborn styles.

Parameter Type Default Description
self - - (undocumented)

plot_predictions(self, y_true, y_pred, time_index=None, y_pred_lower=None, y_pred_upper=None, title='Predictions vs Actual Values', save_path=None)

(undocumented)

Parameter Type Default Description
y_true Union[pd.Series, np.ndarray] - (undocumented)
y_pred Union[pd.Series, np.ndarray] - (undocumented)
time_index Optional[Union[pd.DatetimeIndex, list]] None (undocumented)
y_pred_lower Optional[Union[pd.Series, np.ndarray]] None (undocumented)
y_pred_upper Optional[Union[pd.Series, np.ndarray]] None (undocumented)
title str "Predictions vs Actual Values" (undocumented)
save_path Optional[str] None (undocumented)

plot_residuals(self, y_true, y_pred, title='Residual Analysis', save_path=None)

(undocumented)

Parameter Type Default Description
y_true Union[pd.Series, np.ndarray] - (undocumented)
y_pred Union[pd.Series, np.ndarray] - (undocumented)
title str "Residual Analysis" (undocumented)
save_path Optional[str] None (undocumented)

plot_forecast_window(self, *, y_pred: np.ndarray, y_true: np.ndarray, timestamps_pred: np.ndarray, model_name: str, task_name: str, hyperparameters: Optional[Mapping[str, object]] = None, window_idx: int = 0) -> None

Log actual vs predicted as TensorBoard scalars (no image files).

See :meth:LogManager.log_forecast_window_scalars. Tags group by model, then task, forecast origin (first timestamps_pred), and a stable hyperparameter trial segment when tuning so multiple grid points do not collide in TensorBoard.

Parameter Type Default Description
y_pred np.ndarray - (undocumented)
y_true np.ndarray - (undocumented)
timestamps_pred np.ndarray - (undocumented)
model_name str - (undocumented)
task_name str - (undocumented)
hyperparameters Optional[Mapping[str, object]] None Params used to produce y_true/y_pred (omit or {} for a single-configuration model).
window_idx int 0 (undocumented)

Raises: * ValueError: If y_true, y_pred, or timestamps_pred have incorrect shapes.