Skip to content

The Project was an academic assignment to label images of Handwritten Digits as actual digits

Notifications You must be signed in to change notification settings

adityamatt/Digit_recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

K-Means Clustering

Platform

Ubuntu 16.04

Library Used:

sklearn

pip install sklearn

numpy

pip install numpy

Running Program

I have created two experiments

To run first experiment:

python main.py 1 <NUMBER OF CLUSTERS> <TO_PRINT>   
e.g main.py 1 10 FALSE
where:
<NUMBER OF CLUSTERS> is the number of clusters
<TO_PRINT> is a BOOLEAN VALUE TRUE/FALSE whether to print the assigned label and actual label for each instance
Note Setting <TO_PRINT> to TRUE would print 5000 lines of assigned and actual label for each instance
Output is Accuracy and The mapping between random label given by k means and actual assigned label   
where actual assigned label is the max frequency label in that random label.
See Report for more information

To run Second experiment:

python main.py 2

This would run the k-means for varying number of clusters in k=5 to 100. (You may Change this in Line 27 of main.py if you wish to)

This would print the accuracy for each varying cluster and show a graph as well

About

The Project was an academic assignment to label images of Handwritten Digits as actual digits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages