We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b85ac48 commit 0746cf2Copy full SHA for 0746cf2
timecopilot/models/utils/forecaster.py
@@ -9,6 +9,7 @@
9
from gluonts.time_feature.seasonality import (
10
get_seasonality as _get_seasonality,
11
)
12
+from prophet import Prophet as ProphetBase
13
from scipy import stats
14
from tqdm import tqdm
15
from utilsforecast.plotting import plot_series
@@ -348,6 +349,9 @@ def detect_anomalies(
348
349
min_series_length = df.groupby("unique_id").size().min()
350
# we require at least one observation before the first forecast
351
max_possible_windows = (min_series_length - 1) // h
352
+ # 3 row minimum for a df with Prophet
353
+ if isinstance(self, ProphetBase):
354
+ max_possible_windows -= 1
355
if n_windows is None:
356
_n_windows = max_possible_windows
357
else:
0 commit comments