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

NaN issue in DR_discriminator.py file #2

Closed
Santhanalakshmimano opened this issue Apr 3, 2019 · 4 comments
Closed

NaN issue in DR_discriminator.py file #2

Santhanalakshmimano opened this issue Apr 3, 2019 · 4 comments

Comments

@Santhanalakshmimano
Copy link

Santhanalakshmimano commented Apr 3, 2019

While testing KDD dataset, in DR_discriminator.py file I am getting nan values for reconstruction error, and G_samples are also nan.. Do anybody knows why this happens ?

@Santhanalakshmimano Santhanalakshmimano changed the title how to get the anomaly score in testing file AD_invert.py NaN issue in DR_discriminator.py file Apr 16, 2019
@sathyapatel
Copy link

Hi Santhanalakshmi,
I am facing the same issue on kdd99 test data.. Heuristic sigma is 0 and reconstruction error is NAN..Please let me know, if you solved this issue

@Santhanalakshmimano
Copy link
Author

Hi Sathyapatel,
The issue is due to the distance we calculate. Just change the line
distances = np.sqrt(X_sqnorms.reshape(-1, 1) - 2 * XY + Y_sqnorms.reshape(1, -1)) to
distances = np.sqrt(((X[:, None] - Y[:, :, None]) ** 2).sum(0))

@Adapter525
Copy link

why you change edistances in this way? thank you

@Adapter525
Copy link

@Santhanalakshmimano why you change edistances in this way? thank you

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

3 participants