Machine learning assignment

We will use the Hand-written digit recognition data set in our homework. The database was collected and analyzed in Le Cun et al. (1990). There is a total of 9298 digitized numbers in the database where 7291 of them are used as a training set and 2549 of them are used as a test set. The images were scanned from the U.S. Mail envelopes passing through the Buffalo N.Y. post office. The scanned images were size normalized and de-slanted to fit a 16×16 pixel box. The resulting images are in the form of 16×16 grayscale intensities of images. The training data set containing 7291 rows and 258 columns where the first column is the digit ID (0-9) the second to the 257th column contains the 256 grayscale values and the last column is redundant. The digit ID the actual number for the image given in the corresponding row.Please also pay attention to two points below: Pixels are arranged row-wisely in each row of the data set; From the smallest values to the largest values in the matrix the color changes from white to black

Q1. Read the training data set and test data set into R as matrices. Randomly sample 700 numbers (rows) from the training data set and randomly sample 200 numbers from the test data set. Create one matrix that includes the first 257 columns of the randomly sampled training data set and another matrix that includes the first 257 columns of the randomly sampled test data set.

Q2. Create two frequency tables to count the numbers of images corresponding to the digit ID (0-9) in both the sampled training and test data sets in Q1.

Q3. (a) Create a matrix A0 to include rows that corresponding to the digit ID 0 and the 2nd to 257th columns in the sampled training data set. (d) Repeat parts (a)-(c) for the other digit IDs 1 to 9. Finally combine all the first two projections obtained in part (c) in to a matrix with the first column being the first project and second column being the second projection.

Q4. Visualize the first 6 images of each digit ID in the sampled training and test data sets in Q1. Place all the images from the training data set (or the test data set) in the same plot and label each image with its corresponding row number in the data set.

Requirements: In R

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 30% with the discount code HAPPY