KDD-OpenSource / DeepADoTS

Repository of the paper "A Systematic Evaluation of Deep Anomaly Detection Methods for Time Series".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plot_auroc: TypeError: 'NoneType' object is not subscriptable

WGierke opened this issue · comments

On the current master:

Traceback (most recent call last):
  File "main.py", line 118, in <module>
    main()
  File "main.py", line 17, in main
    run_experiments()
  File "main.py", line 88, in run_experiments
    steps=1)
  File "/repo/experiments.py", line 49, in run_extremes_experiment
    evaluator.plot_auroc(title='Area under the curve for differing outlier heights')
  File "/repo/src/evaluation/evaluator.py", line 220, in plot_auroc
    aurocs = self.benchmark_results[self.benchmark_results['algorithm'] == det.name]['auroc']
TypeError: 'NoneType' object is not subscriptable

We solved it in #83 by manually setting

evaluator.benchmark_results = evaluator.benchmarks()

in all experiment methods. Explicitly setting an instance variable in this way is no nice style and should be refactored.