Skip to content

zdennisz/K_means

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

K means

K means algorithm implmeneted both in python and cpp, in order to show the differences in speed of processing the data of each.

The data set is 100 points with (x,y) coordinates within each point.

The algorithm is explained well in wikipedia.


💻 Python algorithm

The algorithm in python is run via http://www.codeskulptor.org/ online python enviroment.

In the Python algorithm, as it can be seen I have circled the centers of the clusters that were found after approximately 12 iterations of the algorithm. (After 12 iterations the center of the clusters stopped changing significantly).

At the end of the run of the Python algorithm, an output of the results is generated (The runtime calculation does not include output production): VisualizationAlgo

⏳ Runtime Diff

It is clearly seen that the cpp language is much faster in computing that data compared to python. timeDiff

⚠️ Disclaimer: The algorithm is implemented in a very simplistic way, hence if one to implement it in a different way and get different results.

About

💨 K means implementation in cpp and python 💨

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published