{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

mem380_07 - K-Means Clustering An Example Rd Given N...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 K-Means Clustering Given N observations {x 1 , …, x N } where x R d How do we partition the N observations into k sets S = {S_1, …, S_k} where k < N? In general: Difficult problem whether working with identifying 2 d © R. Siegwart, I. Nourbakhsh MEM380: Fundamental Robotics I Fall 2009 1 clusters in R OR identifying k clusters in 2-D Often used in many applications An Example MEM380: Fundamental Robotics I Fall 2009 2 A Simple Algorithm Given N observations Let m i denote the centroid of the set S i for i=1, …, k Two steps: 1. Assignment step 2. Update step MEM380: Fundamental Robotics I Fall 2009 3 Some Pseudocode % Iterate k-means means = initialGuesses; while true % Compute cluster membership membership = assign_clusters(means, data); old_means = means; % Update means based on new membership information for i = 1:k means(i,:) = mean(all x_j \in S_i); end % Decide if you are done MEM380: Fundamental Robotics I Fall 2009 4
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 An Example Matlab Demo MEM380: Fundamental Robotics I Fall 2009 5 Our Initial Example MEM380: Fundamental Robotics I Fall 2009 6 Applying k-means clustering MEM380: Fundamental Robotics I Fall 2009 7 Localization Where am I?
Image of page 2