Browse Source

fx data usage in general_detector

pull/1/head
Coin de Gamma 6 years ago
parent
commit
018e97e132
  1. 6
      analytics/detectors/general_detector/general_detector.py

6
analytics/detectors/general_detector/general_detector.py

@ -17,16 +17,16 @@ logger = logging.getLogger('analytic_toolset')
class GeneralDetector:
def __init__(self, anomaly_name, data):
def __init__(self, anomaly_name):
self.anomaly_name = anomaly_name
self.model = None
self.__load_model()
async def learn(self, segments):
async def learn(self, segments, data):
logger.info("Start to learn for anomaly_name='%s'" % self.anomaly_name)
confidence = 0.02
dataframe = self.data_prov.get_dataframe()
dataframe = data # make dataframae from array
start_index, stop_index = 0, len(dataframe)
if len(segments) > 0:
confidence = 0.0

Loading…
Cancel
Save