htm-community / NAB

The Numenta Anomaly Benchmark
GNU Affero General Public License v3.0
3 stars 3 forks source link

Fix 3rdparty detector bugs #45

Open pmenn36 opened 3 years ago

pmenn36 commented 3 years ago

I noticed when evaluating my own detector using this process that there were two bugs that got in the way:

  1. The default NAB labels contained duplicate rows, but the output of my detector did not contain duplicates. This resulted in a length difference between the labels and the anomaly scores, which raised an AssertionError. I fixed this by adding an optional --removeDuplicateLabels flag. The default behavior remains unchanged.
  2. The anomaly scores from my output csv were being read in as strings instead of floats. I forced casting to float in sweeper.py, which does not affect the default behavior because the anomaly scores from the default detectors are correctly read in as floats anyway.
ctrl-z-9000-times commented 2 years ago

Hi,

Sorry it took a year for anyone to respond to your PR. For what its worth, I just now merged your changes for casting the thresholds to floating point numbers.

I didn't merge the stuff about duplicate records BC I've never encountered that bug. If that is a real bug and something that you still want fixed then ping me (@ctrl-z-9000-times ) and I will review and merge that as well.

Thanks!