Please answer these questions in Python Program in Google Colab with screenshots of the bar chart. This is the image tha
Posted: Fri May 20, 2022 10:45 am
Please answer these questions in Python Program in Google Colab
with screenshots of the bar chart.
This is the image that needs to be downloaded.
Problem 1: Digit classification (30 Marks) In this problem you will classify digits from small handwritten images. 1. (5 marks) Use principle components analysis to produce a 5 dimensional feature vector for each 64 dimensional digit image. 2. (5 mark) Split your low dimensional data into training and test sets. 3. (10 marks) Fit a logistic regression classifier to the training set and estimate the the predictive power of the model using the test set. Plot a bar chart showing the prediction accuracy for each digit. 4. (10 mark) Open ended question: Using any method you wish, build a digit classifier with the best possible predictive power. Credit will be given for for clear coding and comments, creative and rigourous use of methods, and quality of predictions on the test data. The cell below will load the data in the form a set of image vectors X and digit values y. [11] #First download the image data and plot some examples digits load_digits() X = digits.data y = digits. target #The data consists of 8x8 pixel images unravelled into vectors of length 64 #To plot a digit you must reshape into and 8x8 array #Example fig, ax = plt.subplots(1,5, figsize=(10,2)) for i in range(5): dig = x. reshape(8,8) ax.imshow(dig, cmap = 'Greys') ax.axis ('off') plt.show().
δΈ1234
with screenshots of the bar chart.
This is the image that needs to be downloaded.
Problem 1: Digit classification (30 Marks) In this problem you will classify digits from small handwritten images. 1. (5 marks) Use principle components analysis to produce a 5 dimensional feature vector for each 64 dimensional digit image. 2. (5 mark) Split your low dimensional data into training and test sets. 3. (10 marks) Fit a logistic regression classifier to the training set and estimate the the predictive power of the model using the test set. Plot a bar chart showing the prediction accuracy for each digit. 4. (10 mark) Open ended question: Using any method you wish, build a digit classifier with the best possible predictive power. Credit will be given for for clear coding and comments, creative and rigourous use of methods, and quality of predictions on the test data. The cell below will load the data in the form a set of image vectors X and digit values y. [11] #First download the image data and plot some examples digits load_digits() X = digits.data y = digits. target #The data consists of 8x8 pixel images unravelled into vectors of length 64 #To plot a digit you must reshape into and 8x8 array #Example fig, ax = plt.subplots(1,5, figsize=(10,2)) for i in range(5): dig = x. reshape(8,8) ax.imshow(dig, cmap = 'Greys') ax.axis ('off') plt.show().
δΈ1234