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

sqrt is applied twice on dists in median heuristic #1

Open
sanghack81 opened this issue Jul 18, 2017 · 0 comments
Open

sqrt is applied twice on dists in median heuristic #1

sanghack81 opened this issue Jul 18, 2017 · 0 comments

Comments

@sanghack81
Copy link

dists = sqrt(dists)
sig = sqrt(0.5 * np.median(dists[dists > 0]))

Since dists is transformed once, there is no need apply sqrt on the median.
If X and Y in example.m is changed by multiplying 1000, I can see the outcome of tests is changed.

Should the second line be

sig = sqrt(0.5) * np.median(dists[dists > 0])

Once I change the second line, the test becomes immune to the scale of X or Y.

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

1 participant