This is the second assignment I did when taking the course -- Big Data for Data Science. This assignment required me to implement kMeans clustering in Spark without the use of MLib. The programming language used is Scala.
To cluster posts found on StackOverflow according to their scores and domains.
- Group the questions and answers together.
- Choose the highest score for each question.
- Design the vectors for clustering with score and domain. Vector = (Domain Spread of 50000 x Index of Domain , Highest Score from all answer for a particular question)
- Cluster the vectors using k means algorithm.
- Choose k (random) data points (seeds) to be the initial centroids (cluster centers)
- Assign each data point to the closest centroid by computing the distances to centroids
- Re-compute the centroids using the current cluster memberships
- If a convergence criterion is not met, repeat steps 2 and 3.
- Learnt to use Reliable Distributed Datasets (RDDs) and its special set of function - groupByKey, aggregateByKey, reduceByKey.

