View Single Post
Old 10-13-2012, 06:12 AM
magdon's Avatar
magdon magdon is offline
Join Date: Aug 2009
Location: Troy, NY, USA.
Posts: 597
Default Re: Problem 3.3 Typo

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.

Originally Posted by rpistu View Post
For part e, when plotting the data and the final hypothesis learnt from a 3rd order polynomial feature transform, the shape of the nonlinear hypothesis is almost like a line. Is that true? Actually, I didn't find an effective way to plot the nonlinear hypothesis.
Have faith in probability
Reply With Quote