plot_forecast
chronax.plotting.plot_forecast
Plots the actual ground truth values against the forecasted values.
plot_forecast(y, y_hat, y_train=None, ax=None) -> Any
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | The actual time series values for the forecast horizon. |
y_hat |
jnp.ndarray |
- | The predicted forecast values. |
y_train |
Optional[jnp.ndarray] |
None |
Historical training data to plot before the forecast. |
ax |
Optional[Any] |
None |
A matplotlib Axes object to plot on. If None, a new figure is created. |
Returns: Any (The matplotlib Axes object containing the generated plot.)
plot_forecast_intervals
chronax.plotting.plot_forecast_intervals
Plots the forecast along with shaded prediction intervals.
plot_forecast_intervals(y, y_hat, lower, upper, ax=None) -> Any
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | The actual time series values. |
y_hat |
jnp.ndarray |
- | The predicted mean/median forecast values. |
lower |
jnp.ndarray |
- | The lower bounds of the prediction interval. |
upper |
jnp.ndarray |
- | The upper bounds of the prediction interval. |
ax |
Optional[Any] |
None |
A matplotlib Axes object. |
Returns: Any (The matplotlib Axes object containing the generated plot.)
plot_forecast_distribution
chronax.plotting.plot_forecast_distribution
Plots a fan chart showing the forecast distribution using shaded percentile bands.
plot_forecast_distribution(y, y_samples, ax=None, percentiles=(10, 25, 50, 75, 90, 95)) -> Any
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | The actual time series values. |
y_samples |
jnp.ndarray |
- | A 2D array of simulated forecast samples (shape: [num_samples, horizon]). |
ax |
Optional[Any] |
None |
A matplotlib Axes object. |
percentiles |
Tuple[int, ...] |
(10, 25, 50, 75, 90, 95) |
The specific percentiles to plot as shaded regions. |
Returns: Any (The matplotlib Axes object containing the generated fan chart.)
plot_forecast_pdf
chronax.plotting.plot_forecast_pdf
Plots the Probability Density Function (PDF) of the forecast samples at a specific horizon step.
plot_forecast_pdf(y_samples, horizon_idx=-1, bins=30, ax=None) -> Any
| Parameter | Type | Default | Description |
|---|---|---|---|
y_samples |
jnp.ndarray |
- | A 2D array of simulated forecast samples. |
horizon_idx |
int |
-1 |
The specific index of the forecast horizon to plot. Defaults to -1 (the final step). |
bins |
int |
30 |
The number of bins to use for the histogram. |
ax |
Optional[Any] |
None |
A matplotlib Axes object. |
Returns: Any (The matplotlib Axes object containing the plotted PDF.)
plot_chained_window
chronax.plotting.plot_chained_window
Plots sequential cross-validation windows to evaluate rolling model performance.
plot_chained_window(y, y_preds, horizon=1, ax=None) -> Any
| Parameter | Type | Default | Description |
|---|---|---|---|
y |
jnp.ndarray |
- | The actual continuous time series values. |
y_preds |
List[jnp.ndarray] |
- | A list of forecasted arrays, each representing a CV window. |
horizon |
int |
1 |
The forecast horizon length (currently unused in logic, reserved for future functionality). |
ax |
Optional[Any] |
None |
A matplotlib Axes object. |
Returns: Any (The matplotlib Axes object containing the chained cross-validation plot.)
acf
chronax.plotting.acf
Computes the Autocorrelation Function (ACF) array for a given time series.
acf(x, nlags=40) -> jnp.ndarray
| Parameter | Type | Default | Description |
|---|---|---|---|
x |
jnp.ndarray |
- | The input time series data. |
nlags |
int |
40 |
The maximum number of lags to compute. |
Returns: jnp.ndarray (An array containing the autocorrelation coefficients from lag 0 up to nlags.)
plot_acf
chronax.plotting.plot_acf
Computes and plots the Autocorrelation Function (ACF) along with 95% statistical significance bounds.
plot_acf(x, nlags=40) -> None
| Parameter | Type | Default | Description |
|---|---|---|---|
x |
jnp.ndarray |
- | The input time series data. |
nlags |
int |
40 |
The number of lags to compute and display. |
Returns: None (Displays the plot via plt.show().)