From 0363558b91e6c9fe5ef1f62ede1f9de295677f40 Mon Sep 17 00:00:00 2001 From: Evgeny Smyshlyaev Date: Thu, 1 Aug 2019 12:22:33 +0300 Subject: [PATCH] fix (#737) --- analytics/analytics/detectors/pattern_detector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analytics/analytics/detectors/pattern_detector.py b/analytics/analytics/detectors/pattern_detector.py index 7c0796f..936e6bc 100644 --- a/analytics/analytics/detectors/pattern_detector.py +++ b/analytics/analytics/detectors/pattern_detector.py @@ -42,7 +42,8 @@ class PatternDetector(Detector): def __init__(self, pattern_type: str, analytic_unit_id: AnalyticUnitId): super().__init__(analytic_unit_id) - self.model = resolve_model_by_pattern(pattern_type) + self.pattern_type = pattern_type + self.model = resolve_model_by_pattern(self.pattern_type) self.bucket = DataBucket() def train(self, dataframe: pd.DataFrame, segments: List[dict], cache: Optional[ModelCache]) -> ModelCache: