https://github.com/nixtla logo
#statsforecast
Title
# statsforecast
d

Diego Menezes

09/08/2023, 12:41 AM
Dear all, I've been following this tutorial on anomaly detection https://nixtla.github.io/statsforecast/docs/tutorials/anomalydetection.html and everything is good, looks fine until the very last plot:
StatsForecast.plot(insample_forecasts, plot_random = False, plot_anomalies = True)
where only y is shown. No signs of the MSTL forecast or of the red circular markers pointing to where the anomalies were found. I recently bumped from statsforecast = 1.5.0 to 1.6.0. Perhaps there's a bug in the plot function? Thanks, Diego.
m

Max (Nixtla)

09/08/2023, 12:42 AM
@José Morales: can you guide Diego in the right direction?
d

Diego Menezes

09/08/2023, 12:43 AM
Thank you @Max (Nixtla) and no rush guys.
j

José Morales

09/08/2023, 12:52 AM
Hey. Are you using conformal intervals?
d

Diego Menezes

09/08/2023, 1:13 AM
Yes I am. Like this:
intervals = ConformalIntervals(h=48, n_windows=2)
models = [MSTL(season_length = [24, 24*7],prediction_intervals=intervals)]
The rest is the same. P.S.: it used to be
models = [MSTL(season_length = [24, 24*7])]
on 1.5.0
j

José Morales

09/08/2023, 1:16 AM
That's most likely the reason. There's currently a bug that doesn't allow using the native intervals of the trend forecaster in MSTL, so the notebook from 1.5 produced native intervals with the AutoETS model and now they can only be generated through conformal intervals, which produces wider intervals in this case I suppose, so you don't get any outliers. https://github.com/Nixtla/statsforecast/pull/625 will fix that
d

Diego Menezes

09/08/2023, 1:18 AM
Ah ok. Thanks for the clarification. @Valeriy you probably want to write this down in case you see this issue around.
👍 1