Skip to content

Commit

Permalink
Only calculate distances to the correct number of centroids when usin…
Browse files Browse the repository at this point in the history
…g prespecified mus.
  • Loading branch information
ryan committed Jul 9, 2013
1 parent 044d4ed commit a4adc15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shogun/clustering/KMeans.cpp
Expand Up @@ -246,7 +246,7 @@ void CKMeans::clustknb(bool use_old_mus, float64_t *mus_start)
float64_t* p_dists=dists;

for(int32_t idx=0;idx<XSize;idx++,p_dists+=k)
distances_rhs(p_dists,0,k,idx);
distances_rhs(p_dists,0,k - 1,idx);
p_dists=NULL;

for (i=0; i<XSize; i++)
Expand Down

0 comments on commit a4adc15

Please sign in to comment.