We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 087c96e commit 6643e90Copy full SHA for 6643e90
test/transforms/kmedoids.jl
@@ -1,4 +1,16 @@
1
@testset "KMedoids" begin
2
@test !isrevertible(KMedoids(3))
3
@test TT.parameters(KMedoids(3)) == (k=3,)
4
+
5
+ a = [randn(100); 10 .+ randn(100)]
6
+ b = [randn(100); 10 .+ randn(100)]
7
+ t = Table(; a, b)
8
9
+ c = t |> KMedoids(2; rng)
10
+ i1 = findall(isequal(1), c.cluster)
11
+ i2 = findall(isequal(2), c.cluster)
12
+ @test mean(t.a[i1]) > 5
13
+ @test mean(t.b[i1]) > 5
14
+ @test mean(t.a[i2]) < 5
15
+ @test mean(t.b[i2]) < 5
16
end
0 commit comments