Homework_Week7_Coursera【Machine Learning】AndrewNg、Support Vector Machines

Homework_Week7_Coursera【Machine Learning】AndrewNg、Support Vector Machines

题目1

Suppose you have trained an SVM classifier with a Gaussian kernel, and it learned the following decision boundary on the training set:
在这里插入图片描述
在这里插入图片描述

分析

欠拟合、是属于high bias的情况。这个时候需要增大C、减小平方、具体如下图
在这里插入图片描述

答案

B

题目2

The formula for the Gaussian kernel is given by \text{similarity}(x,l^{(1)}) = \exp{(-\frac{||x-l{(1)}||2}{2\sigma^2})}similarity
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

分析

本来是1,现在是0.25 窄一点就是了,高度更高。具体参考
在这里插入图片描述
所以选第三个

答案

C

题目3

在这里插入图片描述

分析

问下面四个条件中的两个都为真则第一项 就会是0 则是哪两个选项?
第一个要是0就证明第二个管用、
第二个是cost0 所以看图1 所以y(i)=0,thetax(i)就要小于等于1 、 cost0的右半部分为1,所以就是y(i)=1,thetax(i)就要大于等于1

答案

BD

题目4

Suppose you have a dataset with n = 10 features and m = 5000 examples.

After training your logistic regression classifier with gradient descent, you find that it has underfit the training set and does not achieve the desired performance on the training or cross validation sets.

Which of the following might be promising steps to take? Check all that apply.
在这里插入图片描述

分析

就是5000个样本10个维度的特征,训练效果不理想、怎么做会比较好
A选项 使用不同的优化手段自从使用梯度下降法去训练逻辑回归可能会导致局部最优、不会的。逻辑回归可以找到全局最优
B创造更多的特征 可以
C尝试使用大量隐藏单元的神经网络.可行
D减少训练集的样本数量、无用

答案

BC

题目5

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

在这里插入图片描述

分析

问正确选项、
A说在使用高斯内核之前对特征进行归一化是很重要的 正确
B 如果数据是线性分散,使用SVM会返回相同的theta不管 你选的C是什么 C大小都会影响分类
C假设你使用SVM去做多任务分类并且想使用1对多的方法。你就会有K中不同的类别、你就会训练K-1种不同的SVM。错误,应该是对应K种不同的svm
d高斯内核的最大值

答案

AD

结果

在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不会写程序的程序员.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值