Browse Source

Hotfix: return cache from pattern_detector.train

pull/1/head
rozetko 6 years ago
parent
commit
592588e12b
  1. 4
      analytics/detectors/pattern_detector.py

4
analytics/detectors/pattern_detector.py

@ -34,7 +34,9 @@ class PatternDetector(Detector):
# TODO: pass only part of dataframe that has segments # TODO: pass only part of dataframe that has segments
self.model.fit(dataframe, segments, cache) self.model.fit(dataframe, segments, cache)
# TODO: save model after fit # TODO: save model after fit
return cache return {
'cache': cache
}
async def predict(self, dataframe: pd.DataFrame, cache: dict): async def predict(self, dataframe: pd.DataFrame, cache: dict):
predicted = await self.model.predict(dataframe, cache) predicted = await self.model.predict(dataframe, cache)

Loading…
Cancel
Save