A Python-based K-means clustering algorithm with a Graphical User Interface (GUI) that can cluster a set of points into clusters using the K-means algorithm. The application allows users to input a set of points and initial centroids (optional) and outputs the clusters of points with a graphical representation of the points in a 2D XY plan with circled clusters in red.
- Clone the repository:
git clone https://github.com/<username>/<repository>.git
- Install the required dependencies:
pip install -r requirements.txt
- Run the application:
python kmeans.py
-
Input the points and initial centroids (if any) in the GUI and click on the "Cluster" button.
-
The clusters of points will be displayed with a graphical representation of the points in a 2D XY plan with circled clusters in red.
- Python 3.9
- Tkinter for GUI
- NumPy for mathematical computations
.
├── kmeans.py # Main application file
├── README.md # Project README file
├── requirements.txt # Required dependencies
└── screenshots # Screenshots directory
├── screenshot1.png
└── screenshot2.png
Contributions are always welcome! Please feel free to raise an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
👨💻 Developed by Hussain Ashiq Khattak