Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Implementations of supervised learning classifiers: K-Nearest & Naive Bayes. Used for digit recognition
Java
tag: v1.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/com/weaverworx/usc/csci561/assignment3
test_data
training_data
.gitignore
README
runKNN8Test.sh

README

* Overview
This project uses the K-Nearest neighbor classifier and Naive Bayes Classifier for digit recognition.  Text files containing broken-down images are formatted with:

  - 1 line per image.
  - Each number on a line represents the pixels greyscale count, from left to right, pixel 1 through pixel 784 (28x28 greyscale images).
  - The example "class" (digit) is the last digit in the line.

* Approach
For K-Nearest neighbor implementation, a euclidean distance formula is used to determine the 'distance' between two images.  The Training data is fed into the system, and using this formula we can determine how close one image is to another.  Sorting, Ranking and Voting take place after making the right comparisons with the test data to the training data.
  - http://en.wikipedia.org/wiki/K-nearest_neighbor_algorithm
  
For Bayes, a Naive Bayes is used.  
  - http://en.wikipedia.org/wiki/Naive_Bayes_classifier
Something went wrong with that request. Please try again.