Skip to content

Commit

Permalink
🐛 Fixed outliers shown in the quantile plots.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adjorn committed Nov 7, 2024
1 parent bcbeca9 commit 08b714a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions sam/visualization/quantile_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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 = (
Expand Down

0 comments on commit 08b714a

Please sign in to comment.