Contact Person: firstname.lastname@example.org
Access Level: Public
License Agreement: Apache2
K-means clustering is a method of cluster analysis that aims to partition ''n'' points into ''k'' clusters in which each point belongs to the cluster with the nearest mean. It follows an iterative refinement strategy to find the centers of natural clusters in the data.
When executed with COMPSs, K-means first generates the input points by means of initialization tasks. For parallelism purposes, the points are split in a number of fragments received as parameter, each fragment being created by an initialization task and filled with random points.
After the initialization, the algorithm goes through a set of iterations. In every iteration, a computation task is created for each fragment; then, there is a reduction phase where the results of each computation are accumulated two at a time by merge tasks; finally, at the end of the iteration the main program post-processes the merged result, generating the current clusters that will be used in the next iteration. Consequently, if ''F'' is the total number of fragments, K-means generates ''F'' computation tasks and ''F-1'' merge tasks per iteration.
runcompss --classpath=application_sources/jar/kmeans.jar kmeans.KMeans <...>
- -c Number of clusters
- -i Number of iterations
- -n Number of points
- -d Number of dimensions
- -f Number of fragments
runcompss --classpath=application_sources/jar/kmeans.jar kmeans.KMeans runcompss --classpath=application_sources/jar/kmeans.jar kmeans.KMeans -c 4 -i 10 -n 2000 -d 2 -f 2
Option 1: Native java
cd application_sources/; javac src/main/java/kmeans/*.java cd src/main/java/; jar cf kmeans.jar kmeans/ cd ../../../; mv src/main/java/kmeans.jar jar/
Option 2: Maven
cd application_sources/ mvn clean package
Created: 10th Nov 2023 at 15:14