Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider a binary classification problem of finding the binary labels y in { 1 , 1 } , for input examples of the form x
Consider a binary classification problem of finding the binary labels y in for input examples of the
form x in R
dtimes
We will use the following loss function which is based on margin m sy
wT x
y
Lm w
m
for m
m Otherwise
a For the case of d ie x x x
T
find the gradient of loss function wLm w wrt unknown weight vector
w w w
T
You may compute
w
Lm w and
w
Lmw and then stack them into the required gradient vector.
Please also note the following derivative rule that you may need:
w fw
fw
fw
w fw
b Now, assume following training data having N examples, is available:
i Input: xi Output: yi
xT y
xT y
xT y
xT y
For the given loss function Lm w and given training dataset, write down the average loss in terms of unknown weight vector
w w w
T
as
Lavgw
N
XN
i
Lmi w
Compute the gradient vector of average loss Lavgw iewLavgw wrt unknown weight vector w w w
T
c Starting from an initial weight vector wT
run single iteration of gradient descent algorithm to find w with
step size alpha
d Report the classification accuracy on the provided training data if you decide to use w as your final weights for the model.
You can assume sign function as your activation function
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