The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 352 Weeks Ago, 5 Days Ago |
| Questions Answered: | 20103 |
| Tutorials Posted: | 20155 |
MBA, PHD
Phoniex
Jul-2007 - Jun-2012
Corportae Manager
ChevronTexaco Corporation
Feb-2009 - Nov-2016
Assignment from nickkynickky
Classification of Handwritten Digits ( Use RStudio, and create an RMarkdown)
Problem Statement
Classification by computer of handwritten digits is a standard problem in pattern recognition. The typical application is automatic reading of zip codes on envelopes. In this assignment you’ll address the following problem: Given a set of manually classified digits (the training set), classify a set of unknown digits (the test set) using SVD method.
Data Set
We will be using the US postal Service database that contains 1707 training and 2007 test digits. Each image is a grayscale 16x16 image that is converted to a 256x1 column vector by stacking all the columns of each image matrix above each other.
The training images are stored in trainInput.csv. (256x1707).
The correct digit corresponding to each column of trainInput is stored in trainOutput.csv.(1x1707).
The test images are stored in testInput.csv. (256x2007).
The correct digit corresponding to each column of testInput is stored in testOutput.csv. (1x2007).
Methodology
Form a matrix A for each digit, such that each column in A represents an image of that digit. (You will have 10 A’s).
Determine the singular value decomposition for each A. (Left singular vectors ui are an orthogonal basis in the image space of that digit. We will refer to the left singular vectors as “singular images.”) You should get 10 sets of singular images, one for each digit.
Express test images as a linear combination of the first k=20 singular images of each digit. (This is a least square problem of the form Ax=b).
Compute the distance between test images and their least square approximations.
Classify each test image to be the digit corresponding to the smallest residual.
Calculate the overall correct classification rate, as well as correct classification rate for each digit in a confusion matrix.
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k Y-----------ou -----------for----------- us-----------ing----------- ou-----------r w-----------ebs-----------ite----------- an-----------d a-----------cqu-----------isi-----------tio-----------n o-----------f m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l