1 / 10

CS525 : Big Data Analytics

CS525 : Big Data Analytics. KMeans Clustering on Hadoop Fall 2013 Elke A. Rundensteiner. K-Means Algorithm. Iterative algorithm until converges. K-Means Algorithm. Step 1: Select K points at random (Centers) Step 2 : For each data point, assign it to the closest center

juana
Télécharger la présentation

CS525 : Big Data Analytics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS525:Big Data Analytics KMeans Clustering on Hadoop Fall 2013 Elke A. Rundensteiner

  2. K-Means Algorithm Iterative algorithm until converges

  3. K-Means Algorithm • Step 1: Select K points at random (Centers) • Step 2: For each data point, assign it to the closest center • Now we formed K clusters • Step 3: For each cluster, re-compute the centers • E.g., in the case of 2D points  • X: average over all x-axis points in the cluster • Y:average over all y-axis points in the cluster • Step 4: If the new centers are different from the old centers (previous iteration)  Go to Step 2

  4. K-Means in MapReduce • Input • One Large Dataset • Output • Set of K Clusters

  5. K-Means in MapReduce • Input • Dataset (set of points in 2D) --Large • Initial centroids (K points) --Small • Output • Set of K final centroids - Small

  6. K-Means in MapReduce • Input • Dataset (set of points in 2D) --Large • Initial centroids (K points) --Small • Map Side • Each map reads the K-centroids + one block from dataset • Assign each point to the closest centroid • Output <centroid, point>

  7. K-Means in MapReduce • Reducer Side • Each reducer contains one cluster • Computes new centroid for its cluster • Output <new-centroid, point?> • Issues : • Reducer access to all old centers ? • Iterations ? • When done ?

  8. K-Means Optimization 1 • Use of Combiners • Similar to the reducer • Computes for each centroid • the local sums • and counts of the assigned points • Sends to the reducer <centroid, <partial aggregates>>

  9. K-Means Optimization 2 • Use of Single Reducer • Amount of data to reducers could be kept very small • Single reducer can tell whether any of the centers has changed or not • Creates a single output file

  10. Other K-Means Optimization Iteration?

More Related