From 6b1e71912000a76723854942a22108d1e55b0e32 Mon Sep 17 00:00:00 2001 From: richardreeve Date: Wed, 29 Nov 2023 22:53:53 +0000 Subject: [PATCH] gkl_divergence() needs same types like kl_divergence() and renyi_divergence() --- test/test_dists.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/test_dists.jl b/test/test_dists.jl index 622d43d..1e326ab 100644 --- a/test/test_dists.jl +++ b/test/test_dists.jl @@ -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))