how to calculate the distance between two centers in K-means algorithm?

I need to get access to centers which are generated in each iteration of K-means algorithm to calculate the distance between to the new center and the older one,actually I want to calculate centers displacements, I mean〖dis〗_k=‖〖c_k^'-c〗_k ‖, I wonder how i can do this!

답변 (1개)

David Young
David Young 2014년 2월 15일

0 개 추천

Depends on how distance and displacement are defined, and also how the centres are represented. Typically though, if you have two vectors representing centres, you would subtract one from the other and use the norm function on the result to get the distance.

카테고리

도움말 센터File Exchange에서 Cluster Analysis and Anomaly Detection에 대해 자세히 알아보기

질문:

2014년 2월 14일

답변:

2014년 2월 15일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by