Answered step by step
Verified Expert Solution
Link Copied!

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 {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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions