Initialization of centroid for kmeans++ algorithm

조회 수: 5 (최근 30일)
AS
AS 2020년 9월 20일
댓글: Image Analyst 2020년 10월 1일
I have applied simple kmeans algorithm for clustering of the datasets, which has dimension 1800 by 3. Now instead of kmeans, I want to initialize the centroid by using kmeans++ algorithm. For simple kmeans I have initialized the centres as per algorithm like Arbitrarily choose an initial k centers C = {c1, c2, · · · , ck}.
But for kmeans++ the initialization procedure is like that
1a. Take one center c1, chosen uniformly at random from X .
1b. Take a new center ci , choosing x ∈ X with probability (D(x)^2) /sum(D(x)^2) .
1c. Repeat Step 1b. until we have taken k centers altogether.
In particular, let D(x) denote the shortest distance from a data point to the closest center. “D2 weighting”
But, I am not understanding the “D2 weighting”.
How to calculate “D2 weighting” value for initialization.
Please provide me any advice regarding this.

답변 (1개)

Image Analyst
Image Analyst 2020년 9월 20일
I believe you can use the 'Replicates' and 'Start' options of kmeans().
  댓글 수: 3
AS
AS 2020년 10월 1일
How I will be using 'Start' option in code? Should I attached the code?
Image Analyst
Image Analyst 2020년 10월 1일
Sure, attach your code and data if you are still having trouble.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by