Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Linear classification Assume that we wish to classify a data vector y i n R 2 into two classes. For this purpose, you design two
Linear classification
Assume that we wish to classify a data vector into two classes. For this purpose, you design two classifiers, namely linear classifier with least square and logistic regression. The parameters of the classifiers are estimated in a supervised manner using data set given in hwdata.txt file Fig The data set contains data samples, s and their labels, s Each row in the data file is associated with one data sample. First two columns in the data file correspond to the first and second coordinates of data vector, and the last column corresponds to the label,
Figure : Scatter plot of data.
a First split the entire data set randomly in training and test sets. Allocate the of the data for training and the rest for test.
b Consider a linear classifier with the following classification rule:
Train the classifier with least square LS approach using training data.
c After training classify the test data and calculate the overall accuracy OA and score metrics.
d Consider a logistic regression with the following classification rule:
To train the classifier write your own gradient descent GD algorithm. Choose the initial values as zero. Set the learning rate and maximum number of iterations to
e After training classify the test data and calculate the overall accuracy OA and score metrics.
f List the performance metrics of the classifiers in a table as follows:
tableOA
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