Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this assignment you have to use python and do all the functions manually (dont use python built-in functions). The assignment states that fishers linear
In this assignment you have to use python and do all the functions manually (dont use python built-in functions). The assignment states that fishers linear discriminant should be examined twice, once without including a bias term and another using a bias term. A confusion matrix should be done on both conditions, then converted to an image.
Machine Learning, Winter 2022 Mini Project 3 Due date is January 6,2023 at 11:59 PM To be solved individually You are required to design a Fisher's Linear Discriminant classification algorithm that can recognize scanned images of the 10 digits ( 0 to 9 ) that you have used in the previous Mini Project. The images in the "Train" folder should be used to train a classifier for each digit using the method used in Mini Project 2 (For Fischer's, you will assign an image to a digit based on the minimum product (not maximum as in least squares classifier ) ). The folder contains a file named "Training Labels.txt" which includes the labels of the 2400 images in order. After the classifiers are trained, test each classifier using the images given in the "Test" folder. Use the following equation for Fisher's Linear Discriminant w=Sw1(m2m1). You will examine Fisher's Linear Discriminant twice. Once without including a bias term in each discriminant function and another using a bias term for each discriminant function. For each time, you will produce a confusion matrix as well as the accuracy of your classifier. Deliverables that should be in your submitted Notebook: a) Your code. b) A confusion matrix without using the bias term. Convert the confusion matrix to an image and save it as "ConfusionNoBias.jpg". c) A confusion matrix while using the bias term. Convert the confusion matrix to an image and save it as "ConfusionWithBias.jpg". d) Comment on whether the use of a bias term has affected the performance of the classifier or not. Important Notes: - If the inverse of Sw1 results in a singular matrix, use the pseudoinverse function. - Your target values should be 0 and 1. - Do not use Python built-in functions for mean, covariance or the Fisher's linear discriminant. You have to implement your own version of all needed functions (reading the images and the confusion matrix are the only exceptions) Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started