斯坦福公开课:Statistical Learning中做错的选择题

4.4 R1 In which of the following problems is Case/Control Sampling LEAST likely to make a positive impact?

A. Predicting a shopper‘s gender based on the products they buy

B. Finding predictors for a certain type of cancer

C. Predicting if an email is Spam or Not Spam

Correct answer: A

Explanation: Case/Control sampling is most effective when the prior probabilities of the classes are very unequal. We expect this to be the case for the cancer and spam problems, but not the gender problem.

4.5 R1 Suppose that in Ad Clicks (a problem where you try to model if a user will click on a particular ad) it is well known that the majority of the time an ad is shown it will not be clicked. What is another way of saying that?

A. Ad Clicks have a low Prior Probability.

B. Ad Clicks have a high Prior Probability.

C. Ad Clicks have a low Density.

D. Ad Clicks have a high Density.

Correct answer: A

Explanation: Whether or not an ad gets clicked is a Qualitative Variable. Thus, it does not have a density. The Prior Probability of Ad Clicks is low because most ads are not clicked.

4.6 R1 Which of the following is NOT a linear function in x:

A. f(x) = a + b^2x

B. The discriminant function from LDA.

C. \delta_k(x) = x\frac{\mu_k}{\sigma^2} - \frac{\mu_k^2}{2\sigma^2} +\log(\pi_k)

D. \text{logit}(P(y = 1 | x)) where P(y = 1 | x) is as in logistic regression

E. P(y = 1 | x) from logistic regression

Correct answer: E Explanation: P(y = 1 | x) from logistic regression is not linear because it involves both an exponential function of x and a ratio.

5.1 R2 What are reasons why test error could be LESS than training error?

A. By chance, the test set has easier cases than the training set.

B. The model is highly complex, so training error systematically overestimates test error.

C. The model is not very complex, so training error systematically overestimates test error.

Correct answer: A

Explanation: Training error usually UNDERestimates test error when the model is very complex (compared to the training set size), and is a pretty good estimate when the model is not very complex. However, it‘s always possible we just get too few hard-to-predict points in the test set, or too many in the training set.

---恢复内容结束---

时间: 2024-12-27 04:08:24

斯坦福公开课:Statistical Learning中做错的选择题的相关文章

斯坦福公开课:Developing IOS 8 App with Swift(1-3)心得体会

最近开始学习Swift开发移动程序.跟随斯坦福大学的公开课进行自学. 这真是一个美好的时代,虽然不能在斯坦福求学,但是可以观看录制的授课录像.讲义,好似老师在给我们上课一样! 心得: 1.每节课信息量很大,每个词,每个操作都是有意而为之的.需要课后好好体会,针对课上讲的知识点多练习.多阅读才能有所体会并掌握要点. 2.英语不过关是短腿.这导致了要看字幕.老师的屏幕上输出的代码.老师鼠标操作.另外字幕中出现的不容易翻译的词语是直接输出的英文原文. 导致眼睛要上下左右到处看,很是狼狈.即便如此也经常

swift-计算器(斯坦福公开课)

看了斯坦福老头的课,真心觉得,我的中文怎么也变的这么垃圾了.是关于iOS8的课程,用swift写的,一个计算器应用的制作,看看人家的课,再看看咱们学校的课(不过垃圾学校,纯粹觉得大学浪费了),废话啊,废话,继续废话.那个老头的代码有些我给省略了,不知道会出现什么问题,反正我是没有发现,如果你发现了,请告诉我.还有就是这个计算器的具体操作步骤是,你先4-> 回车-> 5-> 回车 ->乘号 显示计算结果20 首先是界面的搭建,就是0-9一共10个按钮,然后加减乘除四个操作按键,以及,

斯坦福公开课4:牛顿方法

北京理工大学计算机专业2016级硕士在读,方向:Machine Learning,NLP,DM 本讲大纲: 1.牛顿方法(Newton's method) 2.指数族(Exponential family) 3.广义线性模型(Generalized linear models) 牛顿法 假设有函数:,我们希望找到满足的值. 这里是实数. 牛顿方法执行下面的更新: 具体原理可参考文章<Jacobian矩阵和Hessian矩阵> 下图为执行牛顿方法的过程:  简单的来说就是通过求当前点的导数得到下

斯坦福公开课5:生成学习

北京理工大学计算机专业2016级硕士在读,方向:Machine Learning,NLP,DM 2017/3/21 9:08:46 本讲大纲: 1.生成学习算法(Generative learning algorithm) 2.高斯判别分析(GDA,Gaussian Discriminant Analysis) 3.朴素贝叶斯(Naive Bayes) 4.拉普拉斯平滑(Laplace smoothing) 生成学习 判别学习算法(discriminative learning algorith

【编译器】斯坦福公开课学习2

02-01 将会为教学用语言COOL编写编译器,把COOL编译成MIPS汇编语言.会分为五个部分讲解,首先是写一个COOL程序,程序本身会是一个解释器.之后是词法分析.语法分析.语义分析.代码生成.这些部分都是分离的.即在我们自己实现语法分析时,我们将自己完成的部分嵌入到一个参考编译器中.参考编译器中已经有其他的部分了.这便于对各个部分独立排除错误. 一些COOL代码示例,用于熟悉COOL语言. class Main{ main():Int {1}; }; class Main{ i : IO

关于ios8斯坦福公开课第二课

在这个课程中,我们遇到了这样的代码 @IBAction func oprate(sender: UIButton) { let opration = sender.currentTitle! if userIsOnInput { enter() } switch opration { case "+": performOperation{ $0+$1 } case "−": performOperation{ $1-$0 } case "×":

iOS菜鸟成长笔记(3)——斯坦福公开课学习(1)

一.iOS四层结构 1.Core OS 是用FreeBSD和Mach所改写的Darwin, 是开源.符合POSIX标准的一个Unix核心.这一层包含或者说是提供了整个iPhone OS的一些基础功能,比如:硬件驱动, 内存管理,程序管理,线程管理(POSIX),文件系统,网络(BSD Socket),以及标准输入输出等等,所有这些功能都会通过C语言的API来提供.另外,值得一题的是,这一层最具有UNIX色彩,如果你需要把 UNIX上所开发的程序移植到iPhone上,多半都会使用到Core OS的

斯坦福公开课《机器学习》第五章SVM笔记

为函数间隔的定义 考虑训练样本里r hat的最小值,对应的是训练样本里函数间隔的最坏情形: 几何间隔: = r hat / || w || 最优间隔分类器的定义: 拉格朗日对偶性:略. 若要dual*=primary*=L(w*, α*, β*),w*, α*,β*满足KKT dual complementarity condition(KKT对偶互补条件): 优化间隔分类器: 考虑此分类器的定义,令: 则可得拉格朗日优化问题: 对w, b求偏导数如下: 此外又有: 进而得到: 核函数:(未理解

斯坦福公开课1:机器学习的动机与应用

什么是机器学习? 一个程序对于任务T,输入经验E,通过性能评测方法P衡量该程序在T的性能得到改进. 监督学习 Regression(举例:房屋价格与房屋面积的关系) Classification(举例 :根据年龄和肿瘤大小判断乳腺肿瘤是良性/恶性) 非监督学习 clustering(举例:鸡尾酒会问题) 强化学习 (举例:机器狗,好狗!坏狗!)