diff --git a/CHANGELOG.md b/CHANGELOG.md index 582fe04..8b7c4e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ Version X.Y.Z stands for: - The `dump` and `load` functions are now inherited from the BaseTimeseriesRegressor. - Added abstract functions `dump_parameters` and `load_parameters` for dumping and loading model files. - Implemented `dump_parameters` and `load_parameters` for models. - +- Outliers in the `_interactive_quantile_plot` and `_static_quantile_plot` functions must now be within or *equal* to the quantile boundaries. ## Version 3.2.1 ### Changes diff --git a/sam/visualization/quantile_plot.py b/sam/visualization/quantile_plot.py index d7e0502..2118af4 100644 --- a/sam/visualization/quantile_plot.py +++ b/sam/visualization/quantile_plot.py @@ -271,7 +271,7 @@ def _interactive_quantile_plot( if outlier_min_q is not None and outliers is None: valid_low = y_hat[these_cols[col_order[n_quants - 1 - (outlier_min_q - 1)]]] valid_high = y_hat[these_cols[col_order[n_quants + (outlier_min_q - 1)]]] - outliers = (y_true > valid_high) | (y_true < valid_low) + outliers = (y_true >= valid_high) | (y_true <= valid_low) outliers = outliers.astype(int) k = np.ones(outlier_window) outliers = ( @@ -379,7 +379,7 @@ def _static_quantile_plot( if outlier_min_q is not None and outliers is None: valid_low = y_hat[these_cols[col_order[n_quants - 1 - (outlier_min_q - 1)]]] valid_high = y_hat[these_cols[col_order[n_quants + (outlier_min_q - 1)]]] - outliers = (y_true > valid_high) | (y_true < valid_low) + outliers = (y_true >= valid_high) | (y_true <= valid_low) outliers = outliers.astype(int) k = np.ones(outlier_window) outliers = (