Skip to content

Commit

Permalink
gkl_divergence() needs same types like kl_divergence() and renyi_dive…
Browse files Browse the repository at this point in the history
…rgence()
  • Loading branch information
richardreeve committed Nov 29, 2023
1 parent a395227 commit 6b1e719
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions test/test_dists.jl
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@ end # testset
@test (@inferred corr_dist(x, y)) cosine_dist(x .- mean(x), vec(y) .- mean(y))
@test (@inferred chisq_dist(x, y)) == sum((x - vec(y)).^2 ./ (x + vec(y)))
@test (@inferred spannorm_dist(x, y)) == maximum(x - vec(y)) - minimum(x - vec(y))

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

@test (@inferred meanad(x, y)) mean(Float64[abs(x[i] - y[i]) for i in eachindex(x, y)])
@test (@inferred msd(x, y)) mean(Float64[abs2(x[i] - y[i]) for i in eachindex(x, y)])
@test (@inferred rmsd(x, y)) sqrt(msd(x, y))
Expand Down

0 comments on commit 6b1e719

Please sign in to comment.