Skip to content

Commit

Permalink
Update project
Browse files Browse the repository at this point in the history
  • Loading branch information
raphasampaio committed Feb 5, 2025
1 parent 79e4ffd commit 113685d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/localsearch/kmedoids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,14 @@ function fit!(kmedoids::AbstractKmedoids, distances::AbstractMatrix{<:Real}, res

assignment_step!(kmedoids; result, distances, medoids)

for (cluster, medoid) in enumerate(medoids)
for (i, medoid) in enumerate(medoids)
cluster = result.clusters[i]
for point in medoid
distance = distances[point, cluster]

clusters_size[cluster] += 1
clusters_size[i] += 1
result.objective += distance
result.objective_per_cluster[cluster] += distance
result.objective_per_cluster[i] += distance
end
end

Expand Down

0 comments on commit 113685d

Please sign in to comment.