def __init__(self, time_series, baseline_time_series=None, score_only=False, score_threshold=None,<EOL>score_percent_threshold=None, algorithm_name=None, algorithm_params=None, refine_algorithm_name=None,<EOL>refine_algorithm_params=None, algorithm_class=None):
self.time_series = self._load(time_series)<EOL>self.baseline_time_series = self._load(baseline_time_series)<EOL>self.score_percent_threshold = score_percent_threshold or DEFAULT_SCORE_PERCENT_THRESHOLD<EOL>algorithm_name = algorithm_name or ANOMALY_DETECTOR_ALGORITHM<EOL>self.algorithm = algorithm_class or self._get_algorithm(algorithm_name)<EOL>self.threshold = score_threshold or ANOMALY_THRESHOLD.get(algorithm_name)<EOL>self.refine_algorithm = self._get_algorithm(refine_algorithm_name or ANOMALY_DETECTOR_REFINE_ALGORITHM)<EOL>self.algorithm_params = {'<STR_LIT>': self.time_series, '<STR_LIT>': self.baseline_time_series}<EOL>algorithm_params = algorithm_params or {}<EOL>self.algorithm_params.update(algorithm_params)<EOL>self.refine_algorithm_params = refine_algorithm_params or {}<EOL>self._detect(score_only)<EOL>
Initializer
:param time_series: a TimeSeries, a dictionary or a path to a csv file(str).
:param baseline_time_series: a TimeSeries, a dictionary or a path to a csv file(str).
:param bool score_only: if asserted, only anomaly scores are computed.
:param float score_percent_threshold: percent threshold on anomaly score above which is considered an anomaly.
:param str algorithm_name: name of the algorithm to use(file name).
:param dict algorithm_params: additional params for the specific algorithm.
:param str refine_algorithm_name: name of the refine algorithm to use(file name).
:param dict refine_algorithm_params: additional params for the specific refine algorithm.
:param AnomalyDetectorAlgorithm algorithm_class: A AnomalyDetectorAlgorithm class that when passed to luminol will
    be used to assign anomaly scores. This is useful when luminol user wants to use a custom algorithm.