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.

validate_forecast_sanity

chronax.utils.validate_forecast_sanity

Run sanity checks on forecasts to detect obvious issues.

validate_forecast_sanity(y_true, y_pred, point_forecast_statistic='mean') -> dict

Parameter Type Default Description
y_true np.ndarray - (undocumented)
y_pred np.ndarray - (undocumented)
point_forecast_statistic str "mean" (undocumented)

Returns: dict (a dict with keys: ok, warnings, stats.)

compute_point_forecast

chronax.utils.compute_point_forecast

Compute the point forecast from the predicted samples.

compute_point_forecast(y_pred, point_forecast_statistic) -> np.ndarray

Parameter Type Default Description
y_pred np.ndarray - Prediction array with shape (num_samples, time_steps, num_targets) for stochastic or (time_steps, num_targets) for deterministic.
point_forecast_statistic str - The statistic to apply. Supported values: "mean" (Compute mean across the first dimension (samples)) or "median" (Compute median across the first dimension (samples)).

Returns: np.ndarray (Point forecast array with shape (time_steps, num_targets)) Raises: * ValueError: If point_forecast_statistic is not supported