Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running the model #2

Closed
aleflabo opened this issue May 20, 2021 · 1 comment
Closed

Problem running the model #2

aleflabo opened this issue May 20, 2021 · 1 comment

Comments

@aleflabo
Copy link

Hi,

Thanks for the translation of TadGan into pytorch.
I'm trying to run the code present in this github just running:

python main.py

and I'm having the following error

Traceback (most recent call last):
  File "main.py", line 251, in <module>
    anomaly_detection.test(test_loader, encoder, decoder, critic_x)
  File "/content/drive/MyDrive/TadGAN/anomaly_detection.py", line 27, in test
    find_scores(y_true, y_predict)
  File "/content/drive/MyDrive/TadGAN/anomaly_detection.py", line 131, in find_scores
    precision = tp / (tp + fp)
ZeroDivisionError: division by zero

what could be problem causing this error?

In addition I'd try other dataset mentioned in the TadGan paper, like MSL for example. Is that possible with the code already present?

Thanks in advance.

Alessandro

@arunppsg
Copy link
Owner

Hi Alessandro,

The error occurs when the model makes all prediction as negative. One reason is that the dataset here exchange-2_cpc_results.csv itself has only one or two positive point and the model might fails to detect it. You may checkout other numenta dataset for more details.

Yes, you can reuse the code for other dataset. You need to retrain the model. See here on how to use it for other dataset.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants