Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
K-Means Clustering implemented in Java
shephalika21/K-Means-Implementation-in-Java
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
The program created is generic for any dataset. Any dataset can be given as input to the algorithm after doing data preprocessing. This program should work in both Java7 and Java8.
The program takes below inputs:
- File: Please give the correct path with file name (example: E:\Iris.txt)
- Input value of K – no. of clusters to be created
- Distance measure – Euclidean/Manhattan
- Maximum iterations – 100/200/300
- WCSS (Within Cluster Sum of Squares Error) will be shown as output for each iteration.
- Final Clustering of data — The dataset features with Cluster number is shown in output (If K=5, the cluster number shown as output is 0, 1, 2, 3, 4)
This code has been tested on Iris.txt Dataset
Using elbow method, we can conclude from the graphs that optimal number of clusters is 3
About
K-Means Clustering implemented in Java