forked from salesforce/Merlion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprophet.py
22 lines (17 loc) · 782 Bytes
/
prophet.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# Copyright (c) 2022 salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
#
"""
Adaptation of Facebook's Prophet forecasting model to anomaly detection.
"""
from merlion.models.anomaly.forecast_based.base import ForecastingDetectorBase
from merlion.models.anomaly.base import DetectorConfig
from merlion.models.forecast.prophet import ProphetConfig, Prophet
from merlion.post_process.threshold import AggregateAlarms
class ProphetDetectorConfig(ProphetConfig, DetectorConfig):
_default_threshold = AggregateAlarms(alm_threshold=3)
class ProphetDetector(ForecastingDetectorBase, Prophet):
config_class = ProphetDetectorConfig