Machine Learning week 3

第 2 个问题
1
point

2。第 2 个问题

Suppose you have the following training set, and fit a logistic regression classifier hθ(x)=g(θ0+θ1x1+θ2x2).

Machine Learning week 3Machine Learning week 3

Which of the following are true? Check all that apply.

J(θ) will be a convex function, so gradient descent should converge to the global minimum.

Adding polynomial features (e.g., instead using hθ(x)=g(θ0+θ1x1+θ2x2+θ3x21+θ4x1x2+θ5x22) ) could increase how well we can fit the training data.

The positive and negative examples cannot be separated using a straight line. So, gradient descent will fail to converge.

Because the positive and negative examples cannot be separated using a straight line, linear regression will perform as well as logistic regression on this data.


答案选AB。可以由H函数看出来应该是个convex function

第 3 个问题
1
point

3。第 3 个问题

For logistic regression, the gradient is given by θjJ(θ)=1mmi=1(hθ(x(i))y(i))x(i)j. Which of these is a correct gradient descent update for logistic regression with a learning rate of α? Check all that apply.

θ:=θα1mmi=1(θTxy(i))x(i).

θ:=θα1mmi=1(hθ(x(i))y(i))x(i).

θ:=θα1mmi=1(11+eθTx(i)y(i))x(i).

θj:=θjα1mmi=1(θTxy(i))x(i)j (simultaneously update for all j).

答案选BC 在logistic regression中h(x)应注意

第 4 个问题
1
point

4。第 4 个问题

Which of the following statements are true? Check all that apply.

Linear regression always works well for classification if you classify by using a threshold on the prediction made by linear regression.

For logistic regression, sometimes gradient descent will converge to a local minimum (and fail to find the global minimum). This is the reason we prefer more advanced optimization algorithms such as fminunc (conjugate gradient/BFGS/L-BFGS/etc).

The sigmoid function g(z)=11+ez is never greater than one (>1).

The cost function J(θ) for logistic regression trained with m1 examples is always greater than or equal to zero.


答案选CD  不是因为存在局部最小值而选择的更加优化的算法。

Machine Learning week 3Machine Learning week 3

第 5 个问题
1
point

5。第 5 个问题

Suppose you train a logistic classifier hθ(x)=g(θ0+θ1x1+θ2x2). Suppose θ0=6,θ1=1,θ2=0. Which of the following figures represents the decision boundary found by your classifier?

Figure:

Machine Learning week 3

Figure:

Machine Learning week 3

Figure:

Machine Learning week 3

Figure:

Machine Learning week 3
第五题没读出来figure选项。。。蒙的空白选项