[Solved] ML Homework3- Perceptron

$25

File Name: ML_Homework3-_Perceptron.zip
File Size: 226.08 KB

SKU: [Solved] ML Homework3- Perceptron Category: Tag:
5/5 - (1 vote)
  1. Perceptron. Implement the Perceptron algorithm (in the file name perceptron.py). Do not forget to normalize the samples to have unit length (i.e., kxik = 1).
  • Use only the first n = 5,10,50,100,500,1000,5000 samples as an input to Perceptron. For each n, run Perceptron 100 times, each time with a different random order of inputs, and calculate the accuracy of the classifier on the test set of each run. You should therefore have 100 accuracy measurement per n. Print a table showing, for each n, the mean accuracy across the 100 runs, as well as the 5% and 95% percentiles of the accuracies obtained.
  • The weight vector w, returned by Percepton, can be viewed as a matrix of weights, with which we multiply each respective pixel in the input image. Run Perceptron on the entire training set, and show w, as a 2828 image, for example with imshow(reshape(image, (28, 28)), interpolation=nearest). Give an intuitive interpretation of this image.
  • Calculate the accuracy of the classifier trained on the full training set, applied on the test set.
  • Choose one (or two) of the samples in the test set that was misclassified by Perceptron (with the full training set) and show it as an image (show the unscaled images). Can you explain why it was misclassified?

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] ML Homework3- Perceptron
$25