Question: 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 {1,1}, for input examples of the
form x in R
d\times 1
. We will use the following loss function which is based on margin m = sy =
wT x
y
L(m, w)=(
0.5m2
for m <=0
|m| Otherwise
a. For the case of d =2 i.e. x =[x1 x2]
T
, find the gradient of loss function wL(m, w) w.r.t. unknown weight vector
w =[w1 w2]
T
. You may compute
w1
L(m, w), and
w2
L(m.w) and then stack them into the required gradient vector.
Please also note the following derivative rule that you may need: [6]
w |f(w)|=
f(w)
|f(w)|
w f(w)
b. Now, assume following training data having N =4 examples, is available: [4]
i Input: xi Output: yi
1 x1=[02]T y1=1
2 x2=[01]T y2=1
3 x3=[10]T y3=1
4 x4=[10]T y4=1
For the given loss function L(m, w), and given training dataset, write down the average loss in terms of unknown weight vector
w =[w1 w2]
T
as
Lavg(w)=1
N
XN
i=1
L(mi, w)
Compute the gradient vector of average loss Lavg(w) i.e.wLavg(w) w.r.t. unknown weight vector w =[w1 w2]
T
.
c. Starting from an initial weight vector w(0)=[00.5]T
, run single iteration of gradient descent algorithm to find w(1) with
step size \alpha =0.2[2]
d. Report the classification accuracy on the provided training data if you decide to use w(1) 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!