title: Working Example Of Luminol Anomaly Detection And Correlation Library By Linkedin
body: <p>Github Link Of Luminol Library: <a href="https://github.com/linkedin/luminol" rel="nofollow noreferrer">https://github.com/linkedin/luminol</a></p>
  <p>Can anyone explain me with a sample code, how to use this module for finding anomalies in data set.</p>
  <p>I want to use this module for finding the anomalies in my time series data.</p>
  <p>P.S.: I tried the example 1 provided in README.md but getting error, so someone please provide me a working example for finding anomalies.</p>
  <p>Example 1
  Put anomaly scores in a list.</p>
  <pre><code>from luminol.anomaly_detector import AnomalyDetector
  my_detector = AnomalyDetector(ts)
  score = my_detector.get_all_scores()
  anom_score = list()
  for (timestamp, value) in score.iteritems():
      t_str = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(timestamp))
      anom_score.append([t_str, value])
  </code></pre>
  <p>Getting  <code>value error: (22, 'Invalid argument')  In line: t_str = time.strftime('%Y-%m-%d %H :%M%S', time.localtime(timestamp))</code></p>
  <p>Using Python 2.7</p>
  <p>Thanks :)</p>