Skip to content

Commit

Permalink
Misplaced tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan committed Jul 31, 2017
1 parent b689279 commit 00643b2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/test_dists.jl
Expand Up @@ -114,13 +114,6 @@ end
@test minkowski(a, b, 2) == 1.0
@test hamming(a, b) == 1

@test gkl_divergence(x, y) sum(i -> x[i] * log(x[i] / y[i]) - x[i] + y[i], 1:length(x))

@test meanad(x, y) mean(Float64[abs(x[i] - y[i]) for i in 1:length(x)])
@test msd(x, y) mean(Float64[abs2(x[i] - y[i]) for i in 1:length(x)])
@test rmsd(x, y) sqrt(msd(x, y))
@test nrmsd(x, y) sqrt(msd(x, y)) / (maximum(x) - minimum(x))

bt = [true, false, true]
bf = [false, true, true]
@test rogerstanimoto(bt, bf) == 4.0/5.0
Expand All @@ -141,6 +134,13 @@ end
@test chisq_dist(x, y) == sum((x - vec(y)).^2 ./ (x + vec(y)))
@test spannorm_dist(x, y) == maximum(x - vec(y)) - minimum(x - vec(y))

@test gkl_divergence(x, y) sum(i -> x[i] * log(x[i] / y[i]) - x[i] + y[i], 1:length(x))

@test meanad(x, y) mean(Float64[abs(x[i] - y[i]) for i in 1:length(x)])
@test msd(x, y) mean(Float64[abs2(x[i] - y[i]) for i in 1:length(x)])
@test rmsd(x, y) sqrt(msd(x, y))
@test nrmsd(x, y) sqrt(msd(x, y)) / (maximum(x) - minimum(x))

w = ones(4)
@test sqeuclidean(x, y) wsqeuclidean(x, y, w)

Expand Down

0 comments on commit 00643b2

Please sign in to comment.