Skip to content

This is a centroid-based clustering algorithm that partitions data into k clusters, where each cluster is represented by its centroid.

License

Notifications You must be signed in to change notification settings

ArminMasoumian/K-Means-Clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K-Means-Clustering

Description:

This repository provides a simple implementation of the K-Means clustering algorithm in Python. The goal of this implementation is to provide an easy-to-understand and easy-to-use version of the algorithm, suitable for small datasets.

Features:

  • Implementation of the K-Means clustering algorithm
  • Example code that demonstrates how to use the algorithm on a toy dataset
  • Plots of the clustered data and centroids for visualization
  • A simple script for testing the algorithm on custom datasets

Code Structure:

  • kmeans.py: The main implementation of the K-Means algorithm
  • example.py: Example code that demonstrates how to use the algorithm on a toy dataset
  • test.py: A simple script for testing the algorithm on custom datasets

Usage:

Clone the repository using

git clone https://github.com/username/kmeans-clustering-python.git

Install the required dependencies using

pip install -r requirements.txt

Run the example code using

python example.py

Customize the code in 'test.py' to use the algorithm on your own datasets.

Results

About

This is a centroid-based clustering algorithm that partitions data into k clusters, where each cluster is represented by its centroid.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages