View Single Post
Old 10-13-2012, 10:19 AM
rpistu rpistu is offline
Join Date: Oct 2012
Posts: 10
Default Re: Problem 3.3 Typo

Thanks. It seems like what you said is to plot the data that classified based on the hypothesis. However, the problem requires us to plot the original data and the final hypothesis. For linear classification, the hypothesis is a line, so it's easy to plot. But for nonliear classification, for example the 3rd order polynomial feature transform here, I think it really hard to find the corresponding x2 if given x1 for h(x1, x2): x->ᶲ3. I cannot imagine by using the brute force approach.

Originally Posted by magdon View Post
A simple way to plot a nonlinear classification hypothesis, which is actually the way used for all the figures in the book, is the brute force approach. Construct a grid of points, for example:


So every pair (x1,x2) from each set is a point in 2 dimensions. Now, for every such pair, evaluate the hypothesis h(x1,x2) and plot a red point if h=-1 and a blue point if h=+1. Note h can be any hypothesis, 3rd order polynomial, etc.

It is slow but it works.
Reply With Quote