I am taking the coursera machine learning course by Andrew Ng and have run into some issues.
I do not understand why the answers are like this?
The equations seem to me the same but the graphs are totally different
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
The pictures are a bit misleading in the sense that the outcome of the equations presented, the p-value, could also be plotted on a z-axis. Look at the picture below.
(Picture taken from http://strijov.com/sources/demoDataGen.php). Take care that the picture is illustrative only and is not related to your example perse, although the variable names match. p-value should be interpreted in this context as the probability of the dependent variable equaling a "success" or 1. (Thanks @Scortchi)
In Question 2 you can see that the coefficient of x1 is 0. This means that changing x1 does not affect the p-value. Only changing x2 affects the p-value. If the p-values values form a wave, then x1 would be the beach, to put it practically.
The decision boundary depicted is actually the line that separates the p-value that are smaller and larger than 0.5. Since this line is not affected by x1, the line is parallel to the x1 axis: changing x1 does not influence the p-values.
The illustration might resemble by chance your second example, where the coefficient of x2 is zero.