Skip to content

Commit e6281bb

Browse files
committed
Update kmeans.jl
1 parent ea8e963 commit e6281bb

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/subsetselection/kmeans.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ import PotentialLearning: get_random_subset
22
export KMeans
33

44
struct KMeans <: SubsetSelector
5-
assign :: Vector{<:Int}
6-
c :: Vector{<:Int}
5+
assign :: Vector
6+
c :: Vector
77
batch_size :: Int
88
end
99
# function KMeans(assign::Vector, c::Vector, batch_size::Int)
1010
# return KMeans(assign, c, batch_size)
1111
# end
12-
function KMeans(desc::Vector, k::Int, batch_size::Int)
13-
A = Matrix(reduce(hcat, desc))
14-
res = kmeans(A, k)
15-
return KMeans(assignments(res), counts(res), batch_size)
16-
end
17-
function KMeans(dist::Union{Symmetric{T, Matrix{T}}, Matrix{T}}, k::Int, batch_size::Int) where {T}
18-
res = kmedoids(dist, k)
19-
return KMeans(assignments(res), counts(res), batch_size)
20-
end
12+
# function KMeans(desc::Vector, k::Int, batch_size::Int)
13+
# A = Matrix(reduce(hcat, desc))
14+
# res = kmeans(A, k)
15+
# return KMeans(assignments(res), counts(res), batch_size)
16+
# end
17+
# function KMeans(dist::Union{Symmetric{T, Matrix{T}}, Matrix{T}}, k::Int, batch_size::Int) where {T}
18+
# res = kmedoids(dist, k)
19+
# return KMeans(assignments(res), counts(res), batch_size)
20+
# end
2121

2222
function get_random_subset(
2323
km::KMeans,

0 commit comments

Comments
 (0)