1.Linear Regression with Multiple Variables

转自:https://blog.csdn.net/mupengfei6688/article/details/53098735

1.Suppose m=4 students have taken some class, and the class had a midterm exam and a final exam. You have collected a dataset of their scores on the two exams, which is as follows:

midterm exam (midterm exam)^2 final exam
89 7921 96
72 5184 74
94 8836 87
69 4761 78

You'd like to use polynomial regression to predict a student's final exam score from their midterm exam score. Concretely, suppose you want to fit a model of the form , where  is the midterm score and x_2 is (midterm score)^2. Further, you plan to use both feature scaling (dividing by the "max-min", or range, of a feature) and mean normalization.

What is the normalized feature ? (Hint: midterm = 69, final = 78 is training example 4.) Please round off your answer to two decimal places and enter in the text box below.

平均值为 (7921+5184+8836+4761)/4=6675.5
Max-Min=8836-4761=4075
(4761-6675.5)/4075=-0.46957
保留两位小数为-0.47 
也就是特征缩放的公式是:xi-avg/max-min

2.Which of the following are reasons for using feature scaling?

A.It speeds up gradient descent by making it require fewer iterations to get to a good solution.

B.It speeds up solving for  using the normal equation.

C.It is necessary to prevent gradient descent from getting stuck in local optima.

D.It prevents the matrix  (used in the normal equation) from being non-invertable (singular/degenerate).

迭代次数的减少,加快了正确答案的得出。正规方程对计算只与训练集的大小有关,而与秩无关,不能阻止梯度下降局部最优(ps:正规方程没有局部最优),第四个答案,除非可以减少特征变量,否则不能解决此问题所以选A

正规方程(normal equation):

转载于:https://www.cnblogs.com/BlueBlueSea/p/9434993.html

Andrew Ng-ML习题答案1相关推荐

  1. Andrew Ng ML课程总结(一)

    大致内容 这些文章(包括接下来要写的几篇)是关于Andrew Ng(吴恩达) 在Stanford 机器学习的公开课的总结,视频在网易上有中英文字幕版,coursera上也有对应课程.Andrew Ng ...

  2. 【原】Coursera—Andrew Ng机器学习—Week 9 习题—异常检测

    [原]Coursera-Andrew Ng机器学习-Week 9 习题-异常检测 参考文章: (1)[原]Coursera-Andrew Ng机器学习-Week 9 习题-异常检测 (2)https: ...

  3. [paper reading] 译 + 注 :如何阅读 Research Papers(Andrew Ng)

    [paper reading] 译 + 注 :如何阅读 Research Papers(Andrew Ng) 本文基于吴恩达老师 (Andrew Ng) 在 Stanford Deep Learnin ...

  4. 【原】机器学习公开课 目录(课程笔记、测验习题答案、编程作业源码)...持续更新......

    之前看过的机器学习课程.本文是相关课程笔记.习题答案.作业源码的电梯. 1 Coursera 斯坦福机器学习课程,Andrew Ng 1.1 说明 课程地址和软件下载 Coursera连接不上(视频无 ...

  5. Andrew Ng -- machine learning ex2/吴恩达机器学习ex2

    这个项目包含了吴恩达机器学习ex2的python实现,主要知识点为逻辑回归.正则化,题目内容可以查看数据集中的ex2.pdf 代码来自网络(原作者黄广海的github),添加了部分对于题意的中文翻译, ...

  6. Machine Learning - Andrew Ng on Coursera (Week 6)

    本篇文章将分享Coursera上Andrew Ng的Machine Learning第六周的课程,主要内容有如下,详细内容可以参考文末附件: 评价机器学习算法 Diagnosing bias vs. ...

  7. AI For Everyone:Andrew Ng想用30分钟的非技术课程传达的内容

    AI for everyone是一门非技术性的课程,你将比世界上大多数CEO拥有更多的知识.至少Andrew Ng是这么说的.所以让我们简短地找出他想要表达的意思. 到2030年,人工智能将创造13万 ...

  8. Andrew Ng Machine Learning 专题【Logistic Regression amp; Regularization】

    此文是斯坦福大学,机器学习界 superstar - Andrew Ng 所开设的 Coursera 课程:Machine Learning 的课程笔记. 力求简洁,仅代表本人观点,不足之处希望大家探 ...

  9. C语言程序设计:现代方法(第2版)第二章全部习题答案

    前言 本人在通过<C语言程序设计:现代方法(第2版)>自学C语言时,发现国内并没有该书完整的课后习题答案,所以就想把自己在学习过程中所做出的答案分享出来,以供大家参考.这些答案是本人自己解 ...

  10. 【斯坦福公开课-机器学习】1.机器学习的动机和应用(吴恩达 Andrew Ng)

    文章目录 0三个目标 0先修课程要求 基本工具 1-网址 2-邮箱 3-本系列课程链接 1机器学习的定义 1-1非正式定义 1-2正式的定义 2监督学习(Supervised Learning) 2- ...

最新文章

  1. 迁移学习与图神经网络“合力”模型:用DoT-GNN克服组重识别难题
  2. 队列与环形队列使用数组模拟
  3. zabbix 搭建笔记
  4. js实现代码类似w3School演示效果
  5. selenium2 介绍+简单实战
  6. UiPath Excel 向下填充
  7. httpclient3与httpclient4不同版本使用方法
  8. word编辑公式并编号
  9. 4n35光耦引脚图_常见的高速光耦引脚图
  10. SAT数学公式之几何图形
  11. 众筹php,PHP众筹网源码 众筹网源码
  12. 人月神话(四)削足适履、提纲挈领、未雨绸缪
  13. 让女人无法抗拒的30句表白【实用】
  14. ESXi-Customizer-PS 命令详解
  15. 苹果全球开发者大会推出智能音箱网友吐槽Siri“掉链子”
  16. 复杂网络分析 08网络节点重要性
  17. Linux强大监控工具--dstat
  18. transformer在视觉检测的应用
  19. unity地形之splatalpha研究 地形贴图导出更换与绘制
  20. java 基础 笔试题_非常全面的java基础笔试题

热门文章

  1. 用c语言编程心形,用c语言编写心形图案
  2. 驱动开发之五 --- TDI之一(飞雪楚狂人)
  3. 标题栏、菜单栏、工具栏、状态栏
  4. 新闻分析:微软到底需要雅虎什么?
  5. windows oracle部署碰到的问题:ORA-12541: TNS: 无监听程序/未找到wfmlrsvcapp.ear/导入命令
  6. property follows cocoa naming convention for returning ‘owned‘ objects
  7. 如何在Ubuntu系统下装windows10双系统
  8. 使用 vue-pdf 以及Lodop实现pdf打印预览功能
  9. bat脚本命令的学习
  10. 转载:bat批处理简易教程