《Hands-On Machine Learning with Scikit-Learn & TensorFlow》习题答案 - 第一章

第一章 机器学习概览

Q&A
1. 如何定义机器学习?
机器学习是关于构建可以从数据中学习的系统。学习意味着在给定一些性能指标的情况下,在某些任务上变得更好。

2. 机器学习可以解决的四类问题?
机器学习对于那些我们没有最有效解决方案的复杂问题是非常有用的,它可以代替一长串手工调整的规则,构建适应环境波动的系统,最后帮助人类学习(例如,数据挖掘)。

3. 什么是带标签的训练集?
带标签的训练集是包含每个实例所需解决方案(即标签)的训练集。

4. 最常见的两个监督任务是什么?
回归和分类。

5. 指出四个常见的非监督任务?
聚类、可视化、降维和关联规则学习

6. 要让一个机器人能在各种未知地形行走, 你会采用什么机器学习算法?
如果我们希望机器人学会在各种未知地形中行走,那么强化学习可能会表现最佳,因为这通常是强化学习所解决的问题类型。将问题表示为监督或半监督学习问题是可能的,但这就不那么自然了。

7. 要对你的顾客进行分组, 你会采用哪类算法?
如果您不知道如何定义组,那么您可以使用聚类算法(无监督学习)将您的客户划分为具有相似客户的类群。然而,如果您知道您想要拥有哪些组,那么您可以将每个组的许多示例提供给分类算法(监督学习),它将把您的所有客户分类到这些组中。

8. 垃圾邮件检测是监督学习问题, 还是非监督学习问题?
垃圾邮件检测是一个典型的监督学习问题:算法被输入许多邮件及其标签(垃圾邮件或非垃圾邮件)。

9. 什么是在线学习系统?
与批量学习系统相反,在线学习系统可以逐步学习。这使它能够快速适应不断变化的数据和自主系统,以及对大量数据的训练。

10. 什么是核外学习?
核外算法可以处理大量无法装入计算机主存的数据。一个核外学习算法将数据切割成小批,并使用在线学习技术从这些小批中学习。

11. 什么学习算法是用相似度做预测?
基于实例的学习系统对训练数据进行记忆;然后,当给定一个新实例时,它使用相似性度量来找到最相似的已学习实例并使用它们进行预测。

12. 模型参数和学习算法的超参数的区别是什么?
一个模型有一个或多个模型参数,这些参数决定了给定一个新实例(例如,线性模型的斜率)它将预测什么。学习算法试图找到这些参数的最优值,使模型能够很好地推广到新的实例。超参数是学习算法本身的参数,而不是模型的参数(例如,要应用的正则化量)。

13. 基于模型学习的算法搜寻的是什么? 最成功的策略是什么? 基于模型学习如何做预测?
基于模型的学习算法寻找模型参数的最优值,使模型能够很好地推广到新实例。我们通常通过最小化一个代价函数来训练这类系统,该函数衡量系统在预测训练数据方面的能力有多差,如果模型是正则化的,还会因为模型的复杂性进行惩罚。为了进行预测,我们使用学习算法找到的参数值将新实例的特征提供给模型的预测函数。

14. 机器学习的四个主要挑战是什么?
机器学习面临的一些主要挑战是缺乏数据、数据质量差、数据不具有代表性、特征信息不丰富、模型过于简单而不适合训练数据、模型过于复杂而不适合数据。

15. 如果模型在训练集上表现好, 但推广到新实例表现差, 问题是什么? 给出三个可能的解决方案。
如果一个模型在训练数据上执行得很好,但是在新实例上泛化得很差,那么这个模型可能会过度拟合训练数据(或者说我们在训练数据上非常幸运)。过拟合的可能解决方案是获取更多的数据,简化模型(选择更简单的算法,减少使用的参数或特征的数量,或对模型进行正则化),或减少训练数据中的噪声。

16. 什么是测试集, 为什么要使用它?
在模型投入生产之前,测试集用于估计模型对新实例的泛化误差。

17. 验证集的目的是什么?
验证集用于比较模型。它使选择最佳模型和优化超参数成为可能。

18. 如果用测试集调节超参数, 会发生什么?
如果您使用测试集来优化超参数,那么您就有过拟合测试集的风险,并且您所度量的泛化错误将是乐观的(您可能会启动一个性能比您预期的更差的模型)。

19. 什么是交叉验证, 为什么它比验证集好?
交叉验证是一种不需要单独验证集就可以比较模型(用于模型选择和超参数调优)的技术。这节省了宝贵的培训数据。

免费获取《Hands-On Machine Learning with Scikit-Learn & TensorFlow》英文版、中文版、源码+数据 ,可在微信公众号 “分享猿”,回复关键词 R032 下载
在这里插入图片描述
若要获取更多数字图像处理,python,深度学习,机器学习,计算机视觉等高清PDF以及 更多有意思的 分享,可搜一搜 微信公共号 “分享猿” 免费获取资源。也可扫描下面的二维码关注,期待你的到来~
在这里插入图片描述

When most people hearMachine Learning,” they picture a robot: a dependable butler or a deadly Terminator depending on who you ask. But Machine Learning is not just a futuristic fantasy, it’s already here. In fact, it has been around for decades in some specialized applications, such as Optical Character Recognition (OCR). But the first ML application that really became mainstream, improving the lives of hundreds of millions of people, took over the world back in the 1990s: it was the spam filter. Not exactly a self-aware Skynet, but it does technically qualify as Machine Learning (it has actually learned so well that you seldom need to flag an email as spam anymore). It was followed by hundreds of ML applications that now quietly power hundreds of products and features that you use regularly, from better recommendations to voice search. Where does Machine Learning start and where does it end? What exactly does it mean for a machine to learn something? If I download a copy of Wikipedia, has my computer really “learned” something? Is it suddenly smarter? In this chapter we will start by clarifying what Machine Learning is and why you may want to use it. Then, before we set out to explore the Machine Learning continent, we will take a look at the map and learn about the main regions and the most notable landmarks: supervised versus unsupervised learning, online versus batch learning, instance-based versus model-based learning. Then we will look at the workflow of a typical ML project, discuss the main challenges you may face, and cover how to evaluate and fine-tune a Machine Learning system. This chapter introduces a lot of fundamental concepts (and jargon) that every data scientist should know by heart. It will be a high-level overview (the only chapter without much code), all rather simple, but you should make sure everything is crystal-clear to you before continuing to the rest of the book. So grab a coffee and let’s get started!
When most people hearMachine Learning,” they picture a robot: a dependable butler or a deadly Terminator depending on who you ask. But Machine Learning is not just a futuristic fantasy, it’s already here. In fact, it has been around for decades in some specialized applications, such as Optical Character Recognition (OCR). But the first ML application that really became mainstream, improving the lives of hundreds of millions of people, took over the world back in the 1990s: it was the spam filter. Not exactly a self-aware Skynet, but it does technically qualify as Machine Learning (it has actually learned so well that you seldom need to flag an email as spam anymore). It was followed by hundreds of ML applications that now quietly power hundreds of products and features that you use regularly, from better recommendations to voice search. Where does Machine Learning start and where does it end? What exactly does it mean for a machine to learn something? If I download a copy of Wikipedia, has my computer really “learned” something? Is it suddenly smarter? In this chapter we will start by clarifying what Machine Learning is and why you may want to use it. Then, before we set out to explore the Machine Learning continent, we will take a look at the map and learn about the main regions and the most notable landmarks: supervised versus unsupervised learning, online versus batch learning, instance-based versus model-based learning. Then we will look at the workflow of a typical ML project, discuss the main challenges you may face, and cover how to evaluate and fine-tune a Machine Learning system. This chapter introduces a lot of fundamental concepts (and jargon) that every data scientist should know by heart. It will be a high-level overview (the only chapter without much code), all rather simple, but you should make sure everything is crystal-clear to you before continuing to the rest of the book. So grab a coffee and let’s get started!
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值