Logistic Regression

5 试题

1.

Suppose that you have trained a logistic regression classifier, and it outputs on a new example x a prediction hθ(x) = 0.4. This means (check all that apply):

Our estimate for P(y=0|x;θ) is 0.4.

Our estimate for P(y=0|x;θ) is 0.6.

Our estimate for P(y=1|x;θ) is 0.4.

Our estimate for P(y=1|x;θ) is 0.6.

2.

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

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

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.

At the optimal value of θ (e.g., found by fminunc), we will have J(θ)≥0.

Adding polynomial features (e.g., instead using hθ(x)=g(θ0+θ1x1+θ2x2+θ3x21+θ4x1x2+θ5x22) ) would increase J(θ)because we are now summing over more terms.

If we train gradient descent for enough iterations, for some examples x(i) in the training set it is possible to obtain hθ(x(i))>1.

3.

For logistic regression, the gradient is given by ∂∂θjJ(θ)=∑mi=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.

θ:=θ−α1m∑mi=1(hθ(x(i))−y(i))x(i).

θj:=θj−α1m∑mi=1(θTx−y(i))x(i)j (simultaneously update for all j).

θ:=θ−α1m∑mi=1(11+e−θTx(i)−y(i))x(i).

θ:=θ−α1m∑mi=1(θTx−y(i))x(i).

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 cost function J(θ) for logistic regression trained with m≥1 examples is always greater than or equal to zero.

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

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:

Figure:

Figure:

Figure:

Machine Learning week 3 quiz : Logistic Regression相关推荐

  1. 【Machine Learning实验2】 Logistic Regression求解classification问题

    classification问题和regression问题类似,区别在于y值是一个离散值,例如binary classification,y值只取0或1. 方法来自Andrew Ng的Machine ...

  2. machine learning(15) --Regularization:Regularized logistic regression

    Regularization:Regularized logistic regression without regularization 当features很多时会出现overfitting现象,图 ...

  3. Machine Learning week 2 quiz: Linear Regression with Multiple Variables

    Linear Regression with Multiple Variables 5 试题 1. Suppose m=4 students have taken some class, and th ...

  4. Machine Learning week 11 quiz: Application: Photo OCR

    Application: Photo OCR 5 试题 1. Suppose you are running a sliding window detector to find text in ima ...

  5. Machine Learning week 3 quiz: programming assignment-Logistic Regression

    一.ex2.m: the main .m file to call other function files % matlab%% Machine Learning Online Class - Ex ...

  6. Machine Learning week 6 quiz: programming assignment-Regularized Linear Regression and Bias/Variance

    一.ex5.m %% Machine Learning Online Class % Exercise 5 | Regularized Linear Regression and Bias-Varia ...

  7. Machine Learning week 10 quiz: Large Scale Machine Learning

    Large Scale Machine Learning 5 试题 1. Suppose you are training a logistic regression classifier using ...

  8. Machine Learning week 6 quiz: Machine Learning System Design

    Machine Learning System Design 5 试题 1. You are working on a spam classification system using regular ...

  9. Machine Learning week 6 quiz: Advice for Applying Machine Learning

    Advice for Applying Machine Learning 5 试题 1. You train a learning algorithm, and find that it has un ...

最新文章

  1. Endnote X8云同步:家里单位实时同步文献笔记,有网随时读文献
  2. Codeforces Round #361 (Div. 2) B. Mike and Shortcuts bfs
  3. eclipse 集成 github
  4. 给销售范围组合分配定价过程
  5. js实现贪吃蛇小游戏
  6. Java怎么使用spring定时器_浅析spring定时器的使用
  7. 容器,Docker, Kubernetes和Kyma,以及Kyma对SAP的意义
  8. C# 的TCPClient异步连接与异步读数据
  9. 3%7python_Centos7 Python2 升级到Python3
  10. Spring Security可以做的十件事
  11. 使用Jetty设置JNDI(嵌入式)
  12. 数据特征分析:2.对比分析
  13. 操作系统--用户级线程和内核级线程
  14. css如何让动作有先后,css3动作
  15. 海量数据的常见处理算法
  16. Windows 利用IIS搭建需要身份验证登录的FTP站点
  17. Unity常用工作视图(上)(5大基本视图)
  18. 异常:java.lang.LinkageError: loader constraint violation: when resolving interface method “javax.servl
  19. 求解VRP问题的节约里程法、sweep扫描算法和λ互换法
  20. php在线加密源代码,2019最新PHP在线云加密平台源码

热门文章

  1. 人工智能火了 高端人才成了香饽饽
  2. Spring Cloud Alibaba - 14 OpenFeign自定义配置 + 调用优化 + 超时时间
  3. jvm性能调优实战 - 49OOM异常进行监控以及online处理
  4. Spring Cloud【Finchley】-08使用Hystrix实现容错
  5. 实战SSM_O2O商铺_20【商铺编辑】View层开发
  6. MyBatis-22MyBatis缓存配置【一级缓存】
  7. php 会议签到系统_人脸识别会议签到系统有哪些优点?
  8. Springboot 解决跨域的四种姿势
  9. 体验使用node.js创建vue+Element-UI项目
  10. 常见的前端vue面试题