Question: In this problem we will build our intuition for constructing optimal decision boundaries. Consider a natural language processing ( NLP ) task where we are

In this problem we will build our intuition for constructing optimal decision boundaries.
Consider a natural language processing (NLP) task where we are trying to determine whether an Amazon
book review is positive or negative. We have checked each review to see if they contain the words def-
initely,great and best(disregarding capitalization), which we encoded into a feature vector in the
following way: x =[x1, x2, x3]T , where xi is 1 if the word exists in a review and 0 otherwise (in the order
definitely,great and best). This is a form of text representation known as a bag of words model.
Our training dataset consists of the following reviews and corresponding ratings (y(i) represents the label
for review i. y(i) is 1 for positive reviews and 1 for negative reviews):
Review y(i)
My Professor said this book was great, but I was definitely disappointed-1
My sister Radhika loved this book! So great! Its definitely the best gift.1
This author is the best. Definitely my favorite.1
Just bad. So so bad. Will definitely never read again.-1
Table 1: Dataset for Question 2
For example, the review My sister Radhika loved this book! So great! Its the best gift. would be encoded
in the bag of words model as x =[0,1,1]T . We aim to find parameters \theta , b such that for all x(i) in our
training set sign(\theta x(i))= y(i).
(a)(1pt) Provide a mathematical representation of the feature space (i.e. all possible feature vectors).
(b)(1pt) Provide a mathematical representation of the label space (i.e. all possible output classes) for this
classification problem.
(c)(3pts) If b =0(i.e., no explicit offset), would it be possible to learn such a \theta ? Provide an example of
such \theta or explain why its not possible.

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 Programming Questions!