Skip to content

psyclone20/k-means-clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k-means Clustering

A Java program to cluster a dataset in CSV format using k-means clustering

Input

The user must provide the following inputs:

  • Name of the CSV dataset (make sure that the header line is removed)
  • The X and Y attributes from the dataset
  • The number of clusters
  • The maximum number of iterations

Output

An array of ArrayLists which can be passed to other graph libraries (not included) to visualize the output.

Following is the output for 2, 3, 4 and 6 clusters for the FIFA 17 dataset visualized using Plotly. The player's FIFA rating is plotted against his age

2 clusters 3 clusters 4 clusters 6 clusters