Github repo for the Course: Stanford Machine Learning (Coursera)
Quiz Needs to be viewed here at the repo (because the image solutions cant be viewed as part of a gist)
Answer | Explanation |
---|---|
Our estimate for P(y=0|x;θ) is 0.8. | P(y=0|x;θ) = 1 - P(y = 1| x; θ); the former is 1 - 0.2 = 0.8 |
Our estimate for P(y=1|x;θ) is 0.2. | hθ(x) = 0.2 |
Answer | Explanation |
---|---|
J(θ) will be a convex function, so gradient descent should converge to the global minimum. | none |
Adding polynomial features (e.g., instead using hθ(x) = g(θ0 + θ1x1 + θ2x2 + θ3x2 + θ4x1x2 + θ5x2 )) could increase how well we can fit the training data | Adding new features can only improve the fit on the training set: since setting θ3 = θ4 = θ5 = 0 makes the hypothesis the same as the original one, gradient descent will use those features (by making the corresponding non-zero) only if doing so improves the training set fit |
Answer | Explanation |
---|---|
The cost function J(θ) for logistic regression trained with examples is always greater than or equal to zero. | The cost for any example x(i) is always ≥ 0 since it is the negative log of a quantity less than one. The cost function J(θ) is a summation over the cost for each eample, so the cost function itself must be greater than or equal to zero. |
The sigmoid function is never greater than one | none |