Review05 [coursera] Machine learning - Stanford University - Andrew Ng

Logistic Regression

 

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

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

  • Adding polynomial features (e.g., instead using hθ​(x)=g(θ0​+θ1​x1​+θ2​x2​+θ3​x12​+θ4​x1​x2​+θ5​x22​) ) could increase how well we can fit the training data. T
  • At the optimal value of θ (e.g., found by fminunc), we will have J(θ)≥0. T

The cost functionJ(θ) is always non-negative for logistic regression.

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

While it is true they cannot be separated, gradient descent will still converge to the optimal fit. Some examples will remain misclassified at the optimum.

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

The cost function for logistic regression is convex, so gradient descent will always converge to the global minimum.

 

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

 

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). F

The cost function for logistic regression is convex, so gradient descent will always converge to the global minimum. We still might use a more advanded optimization algorithm since they can be faster and don't require you to select a learning rate.

 

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值