当前位置: 首页 > news >正文

1. 机器学习基本知识(5)——练习题(参考答案)

20.🔗本章代码笔记📓链接(需要🪜):(01_the_machine_learning_landscape.ipynb - Colab (google.com))

如果你不想通过上面的官方网址下载本章的笔记,还可以在本篇博文的附件中下载笔记!但我更推荐你支持原版的书和原版的网址


21.参考答案原文及其中文翻译:

  1. Machine Learning is about building systems that can learn from data.
    机器学习是关于构建能够从数据中学习的系统。

    Learning means getting better at some task, given some performance measure.
    学习意味着在某些任务上变得更好,这是根据某些性能度量来衡量的。

  2. Machine Learning is great for complex problems for which we have no algorithmic solution, to replace long lists of hand-tuned rules, to build systems that adapt to fluctuating environments, and finally to help humans learn (e.g., data mining).
    机器学习非常适合那些我们没有算法解决方案的复杂问题,用来替代长长的手工调整规则列表,构建能够适应波动环境的系统,最终帮助人类学习(例如,数据挖掘)。

  3. A labeled training set is a training set that contains the desired solution (a.k.a. a label) for each instance.
    一个被标记的训练集是一个训练集,它为每个实例包含了期望的解决方案(即标签)。

  4. The two most common supervised tasks are regression and classification.
    两种最常见的监督任务是回归和分类。

  5. Common unsupervised tasks include clustering, visualization, dimensionality reduction, and association rule learning.
    常见的无监督任务包括聚类、可视化、降维和关联规则学习。

  6. Reinforcement Learning is likely to perform best if we want a robot to learn to walk in various unknown terrains, since this is typically the type of problem that Reinforcement Learning tackles. It might be possible to express the problem as a supervised or semi-supervised learning problem, but it would be less natural.
    如果我们希望机器人学会在各种未知地形中行走,强化学习可能会表现得最好,因为这是强化学习通常处理的问题类型。虽然有可能将问题表达为监督或半监督学习问题,但这样做会显得不那么自然。

  7. If you don’t know how to define the groups, then you can use a clustering algorithm (unsupervised learning) to segment your customers into clusters of similar customers. However, if you know what groups you would like to have, then you can feed many examples of each group to a classification algorithm (supervised learning), and it will classify all your customers into these groups.
    如果你不知道如何定义组别,那么可以使用聚类算法(无监督学习)将客户分割成相似客户的群集。然而,如果你知道你想要的组别,那么你可以向分类算法(监督学习)提供每个组的许多示例,它将把所有客户分类到这些组中。

  8. Spam detection is a typical supervised learning problem: the algorithm is fed many emails along with their labels (spam or not spam).
    垃圾邮件检测是一个典型的监督学习问题:算法被输入了许多电子邮件及其标签(垃圾邮件或非垃圾邮件)。

  9. An online learning system can learn incrementally, as opposed to a batch learning system. This makes it capable of adapting rapidly to both changing data and autonomous systems, and of training on very large quantities of data.
    在线学习系统可以逐步学习,与批量学习系统相反。这使得它能够快速适应变化的数据和自主系统,并且能够训练大量数据。

  10. Out-of-core algorithms can handle vast quantities of data that cannot fit in a computer’s main memory. An out-of-core learning algorithm chops the data into mini-batches and uses online learning techniques to learn from these mini-batches.
    核心外算法可以处理大量无法适应计算机主存储器的数据。核心外学习算法将数据分割成小批量,并使用在线学习技术从小批量中学习。

  11. An instance-based learning system learns the training data by heart; then, when given a new instance, it uses a similarity measure to find the most similar learned instances and uses them to make predictions.
    基于实例的学习系统通过心记忆训练数据;然后,当给定一个新的实例时,它使用相似性度量来找到最相似的学习实例,并用它们进行预测。

  12. A model has one or more model parameters that determine what it will predict given a new instance (e.g., the slope of a linear model). A learning algorithm tries to find optimal values for these parameters such that the model generalizes well to new instances. A hyperparameter is a parameter of the learning algorithm itself, not of the model (e.g., the amount of regularization to apply).
    模型有一个或多个模型参数,这些参数决定了它将对新实例进行什么预测(例如,线性模型的斜率)。学习算法试图找到这些参数的最优值,以便模型能够很好地泛化到新实例。超参数是学习算法本身的参数,而不是模型的参数(例如,要应用的正则化量)。

  13. Model-based learning algorithms search for an optimal value for the model parameters such that the model will generalize well to new instances. We usually train such systems by minimizing a cost function that measures how bad the system is at making predictions on the training data, plus a penalty for model complexity if the model is regularized. To make predictions, we feed the new instance’s features into the model’s prediction function, using the parameter values found by the learning algorithm.
    基于模型的学习算法寻找模型参数的最优值,以便模型能够很好地泛化到新实例。我们通常通过最小化一个代价函数来训练这样的系统,该函数衡量系统在训练数据上进行预测的表现有多差,如果模型进行了正则化,还会加上模型复杂性的惩罚。要进行预测,我们将新实例的特征输入到模型的预测函数中,使用学习算法找到的参数值。

  14. Some of the main challenges in Machine Learning are the lack of data, poor data quality, nonrepresentative data, uninformative features, excessively simple models that underfit the training data, and excessively complex models that overfit the data.
    机器学习面临的一些主要挑战包括数据缺乏、数据质量差、数据不具代表性、特征不具信息量、过于简单的模型导致训练数据欠拟合,以及过于复杂的模型导致数据过拟合。

  15. If a model performs great on the training data but generalizes poorly to new instances, the model is likely overfitting the training data (or we got extremely lucky on the training data). Possible solutions to overfitting are getting more data, simplifying the model (selecting a simpler algorithm, reducing the number of parameters or features used, or regularizing the model), or reducing the noise in the training data.
    如果一个模型在训练数据上表现很好,但对新实例的泛化能力很差,那么模型可能过拟合了训练数据(或者我们在训练数据上非常幸运)。解决过拟合的可能方案是获取更多数据、简化模型(选择一个更简单的算法、减少使用的参数或特征数量,或者对模型进行正则化)或减少训练数据中的噪声。

  16. A test set is used to estimate the generalization error that a model will make on new instances, before the model is launched in production.
    测试集用于在模型投入生产之前估计模型将在新实例上犯的泛化错误。

  17. A validation set is used to compare models. It makes it possible to select the best model and tune the hyperparameters.
    验证集用于比较模型。它使得选择最佳模型和调整超参数成为可能。

  18. The train-dev set is used when there is a risk of mismatch between the training data and the data used in the validation and test datasets (which should always be as close as possible to the data used once the model is in production). The train-dev set is a part of the training set that’s held out (the model is not trained on it). The model is trained on the rest of the training set, and evaluated on both the train-dev set and the validation set. If the model performs well on the training set but not on the train-dev set, then the model is likely overfitting the training set. If it performs well on both the training set and the train-dev set, but not on the validation set, then there is probably a significant data mismatch between the training data and the validation + test data, and you should try to improve the training data to make it look more like the validation + test data.
    当训练数据与验证和测试数据集使用的数据之间存在不匹配的风险时,使用训练-开发集(train-dev set)。训练-开发集是保留出来的训练集的一部分(模型未在此部分上训练)。模型在训练集的其余部分上进行训练,并在训练-开发集和验证集上进行评估。如果模型在训练集上表现良好,但在训练-开发集上表现不佳,那么模型可能过拟合了训练集。如果它在训练集和训练-开发集上都表现良好,但在验证集上表现不佳,那么训练数据与验证+测试数据之间可能存在显著的数据不匹配,你应该尝试改进训练数据,使其更接近验证+测试数据。

  19. If you tune hyperparameters using the test set, you risk overfitting the test set, and the generalization error you measure will be optimistic (you may launch a model that performs worse than you expect).
    如果你使用测试集来调整超参数,你冒着过拟合测试集的风险,你测量的泛化错误将会是乐观的(你可能推出的模型表现比你预期的要差)。

相关文章:

1. 机器学习基本知识(5)——练习题(参考答案)

20.🔗本章代码笔记📓链接(需要🪜):(01_the_machine_learning_landscape.ipynb - Colab (google.com)) 如果你不想通过上面的官方网址下载本章的笔记,还可以在本篇博文的…...

spark-sql 备忘录

wordcount sc.textFile("../data/data.txt").flatMap(_.split(" ")).map((_,1)).reduceByKey(__).collect 读取json 文件 并通过sql 执行 join 查询 public static void main(String[] args) {SparkSession session SparkSession.builder().master(&qu…...

基于softmax回归的多分类

基于softmax回归的多分类任务是机器学习领域中的一种常见应用。softmax回归,又称多项逻辑回归或多类逻辑回归,是逻辑回归在多分类问题上的推广。以下是对基于softmax回归的多分类任务的详细解释: 一、softmax回归的原理 softmax回归的核心思想是通过softmax函数将输入数据…...

bs4基本运用

1. bs4基本使用 1.1. 简介 bs4的全称为 BeautifulSoup。和lxml一样,是一个html的解析器,主要功能也是解析数据和提取数据 。 本模块作为了解模块,实际开发中很少用这个模块去解析数据,大家可能会想为什么这个模块会逐渐被淘汰&…...

MySQL 时区参数 time_zone 详解

文章目录 前言1. 时区参数影响2. 如何设置3. 字段类型选择 前言 MySQL 时区参数 time_zone 有什么用?修改它有什么影响?如何设置该参数,本篇文章会详细介绍。 1. 时区参数影响 time_zone 参数影响着 MySQL 系统函数还有字段的 DEFAULT CUR…...

Redis - 消息队列 Stream

一、概述 消息队列 定义 消息队列模型:一种分布式系统中的消息传递方案,由消息队列、生产者和消费者组成消息队列:负责存储和管理消息的中间件,也称为消息代理(Message Broker)生产者:负责 产…...

Docker:国内加速源

阿里云docker加速云&#xff1a; sudo tee /etc/docker/daemon.json <<EOF { “registry-mirrors”: [“https://euf11uji.mirror.aliyuncs.com”] } EOFhttps://docker.mozhu.dev/ sudo tee /etc/docker/daemon.json <<EOF {"registry-mirrors": [&qu…...

Android Studio更改项目使用的JDK

一、吐槽 过去&#xff0c;在安卓项目中配置JDK和Gradle的过程非常直观&#xff0c;只需要进入Android Studio的File菜单中的Project Structure即可进行设置&#xff0c;十分方便。 原本可以在这修改JDK: 但大家都知道&#xff0c;Android Studio的狗屎性能&#xff0c;再加…...

ubuntu+ros新手笔记(四):gazebo无法加载

以下为ChatGPT 的解决方案&#xff0c;对我来说是可行的&#xff01;&#xff01; 我按照第2步操作就解决辣&#xff01;&#xff01; 我的提问&#xff1a; 在ubuntu 22.04 和ros2 humble环境下&#xff0c;gazebo加载不了 ChatGPT 回答&#xff1a; 在 Ubuntu 22.04 和 …...

vue季度选择器(antd2.0 版本无此控件,单独写一个)

vue季度选择器 效果显示 效果显示 <template><div><a-popoverplacement"bottom"overlayClassName"season-picker"trigger"click"v-model"showSeason"><template #content><div class"season-picker-b…...

C/C++代码性能优化技巧的书籍及资料

使用C/C开发的场景&#xff0c;大多对代码的执行的速度&#xff0c;实时性有较高的要求&#xff0c;像嵌入式系统的开发&#xff0c;资源还受限。在算力存储空间有限的MCU上写出简洁又高效的代码实际是一种艺术。软件工程师在代码设计上的这种差距&#xff0c;会反映在产品的性…...

通俗易懂的 Nginx 反向代理 配置

通俗易懂的 Nginx 反向代理 配置 首先 root 与 alias 的区别 root 是直接拼接 root location location /i/ {root /data/w3; }当请求 /i/top.gif &#xff0c;/data/w3/i/top.gif 会被返回。 alias 是用 alias 替换 location location /i/ {alias /data/w3/images/; }当请…...

docker设置容器自动启动

说起开机自动启动应该很多人都遇到过&#xff0c;我们公司做的系统很多的中间件都没有设置开机自动启动然后中间修改问题又设置了一些临时生效的文件&#xff0c;开始的时候大家都不以为意&#xff0c;知道公司陆续有人离职入职管理交接一塌糊涂&#xff0c;项目成了历史遗留问…...

蓝桥杯刷题——day1

蓝桥杯刷题——day1 题目一题干题目解析代码 题目二题干题目解析代码 题目一 题干 给定一个字符串 s &#xff0c;验证 s 是否是 回文串 &#xff0c;只考虑字母和数字字符&#xff0c;可以忽略字母的大小写。本题中&#xff0c;将空字符串定义为有效的 回文串 。 题目链接&a…...

Leetcode 面试150题 399.除法求值

系列博客目录 文章目录 系列博客目录题目思路代码 题目 链接 思路 广度优先搜索 我们可以将整个问题建模成一张图&#xff1a;给定图中的一些点&#xff08;点即变量&#xff09;&#xff0c;以及某些边的权值&#xff08;权值即两个变量的比值&#xff09;&#xff0c;试…...

活动预告 |【Part2】Microsoft 安全在线技术公开课:安全性、合规性和身份基础知识

课程介绍 通过参加“Microsoft 安全在线技术公开课&#xff1a;安全性、合规性和身份基础知识”活动提升你的技能。在本次免费的介绍性活动中&#xff0c;你将获得所需的安全技能和培训&#xff0c;以创造影响力并利用机会推动职业发展。你将了解安全性、合规性和身份的基础知…...

Unity游戏实战

很小的时候在键盘机上玩过一个游戏叫寻秦&#xff0c;最近看有大佬把他的安卓版做出来了&#xff0c;打开封面就是Unity&#xff0c;想自己也尝试一下。...

SQL中的替换函数replace() 使用

这条 SQL 语句的作用是将 tool_tool 表中所有 link 字段包含 https://www.xxspvip.cn 的记录中的 https://www.xxspvip.cn 替换为 http://192.168.1.1。具体解释如下&#xff1a; SQL 语句分解 UPDATE tool_toolSET link REPLACE(link, https://www.xxspvip.cn, http://192.…...

Python面试常见问题及答案5

一、基础语法相关 问题1&#xff1a; Python的可变数据类型和不可变数据类型有哪些&#xff1f; 答案&#xff1a; 在Python中&#xff0c;可变数据类型有列表&#xff08;list&#xff09;、字典&#xff08;dict&#xff09;、集合&#xff08;set&#xff09;。这些数据类型…...

(css)element中el-select下拉框整体样式修改

(css)element中el-select下拉框整体样式修改 重点代码&#xff08;颜色可行修改&#xff09; // 修改input默认值颜色 兼容其它主流浏览器 /deep/ input::-webkit-input-placeholder {color: rgba(255, 255, 255, 0.50); } /deep/ input::-moz-input-placeholder {color: rgba…...

微前端进阶:WuJie + Vite + Vue3 的无界架构性能优化全攻略

1. WuJie微前端框架的核心优势 WuJie作为新一代微前端解决方案&#xff0c;最大的特点就是真正实现了"无界"体验。我在多个大型项目中实测发现&#xff0c;它完美解决了传统iframe方案存在的样式隔离、通信困难等问题。不同于single-spa这类基于路由的微前端框架&…...

别再死记硬背分度表了!用Python+Arduino动手复现K型热电偶测温全过程

别再死记硬背分度表了&#xff01;用PythonArduino动手复现K型热电偶测温全过程 温度测量是工程实践中最基础却又最关键的环节之一。想象一下&#xff0c;当你需要监控3D打印机热床温度、测量自制咖啡烘焙机的内部环境&#xff0c;或是记录太阳能热水器的水温变化时&#xff0c…...

pygcn终极指南:解决图神经网络开发者最常遇到的10个核心问题

pygcn终极指南&#xff1a;解决图神经网络开发者最常遇到的10个核心问题 【免费下载链接】pygcn Graph Convolutional Networks in PyTorch 项目地址: https://gitcode.com/gh_mirrors/py/pygcn pygcn是一个基于PyTorch实现的图卷积网络&#xff08;GCN&#xff09;框架…...

关于eclipse2019中导入克隆的web项目

分为导入项目和排查可能错误两个方面前言&#xff1a;本文主要总结个人在完成需要合作完成学习项目时&#xff0c;使用共享项目文件时“环境”问题导致的无法“跑通”&#xff0c;为此忙碌很久和豆包进行了“深入聊天”。决定对自己的问题进行总结&#xff0c;方便自己以后阅读…...

美国低值包裹政策收紧后跨境卖家如何重做运营安全底盘

暗流涌动&#xff1a;跨境物流变局下的生存法则清晨&#xff0c;深圳华强北的某个跨境工作室里&#xff0c;键盘敲击声此起彼伏。屏幕上的订单如往常一样跳动&#xff0c;但运营负责人李薇的眉头却紧锁着。她刚刚收到物流服务商的紧急通知&#xff1a;一批通过“低值货物”通道…...

聊着天把虾队管了:用 HiClaw 正确打开多智能体协作方式【限时领 PPT】

作者&#xff1a;戴靖泽&#xff08;静择&#xff09; 本文整理自 DataWhale x HiClaw 直播分享&#xff0c;聊聊多 Agent 协作背后的工程思考。 点击此处&#xff0c;查看分享&#xff01; 你有没有试过让一个 AI 同时写前端和后端&#xff1f;聊到后面它把自己定好的 API …...

空间多组学解决方案发展提速:未来六年CAGR锁定15.3%,行业增长预期持续向好

在生命科学领域&#xff0c;精准医学和个性化治疗的需求日益增长&#xff0c;对生物组织和细胞在空间维度上的深入理解成为关键。空间多组学解决方案作为这一需求的核心支撑技术&#xff0c;正受到全球科研和产业界的广泛关注。据恒州诚思调研统计&#xff0c;2025年全球空间多…...

利用快马平台快速构建node.js express api原型,十分钟搭建可运行后端服务

今天想和大家分享一个快速搭建Node.js后端服务的实践心得。作为一个经常需要验证想法的开发者&#xff0c;我发现用InsCode(快马)平台可以省去很多环境配置的麻烦&#xff0c;特别适合做原型开发。 为什么选择Node.jsExpress组合 Express框架是Node.js生态中最轻量灵活的Web框架…...

新手避坑指南:如何根据你的Python学习路径选择Jupyter、PyCharm或VS Code

Python新手工具选择指南&#xff1a;从Jupyter到PyCharm的实战路径规划 第一次打开Python安装包时&#xff0c;那种混杂着期待与困惑的感觉我至今记得清晰——就像站在乐高积木货架前的小孩&#xff0c;明明每盒都写着"Python"&#xff0c;拆开后却发现里面的零件形状…...

STM32CubeMX + EG2131预驱芯片:搞定无刷电机六步换向的硬件配置避坑指南

STM32CubeMX与EG2131预驱芯片的无刷电机六步换向实战解析 引言 在嵌入式电机控制领域&#xff0c;无刷直流电机&#xff08;BLDC&#xff09;因其高效率、长寿命和低维护成本等优势&#xff0c;正逐步取代传统有刷电机。然而&#xff0c;当工程师们从理论转向实践时&#xff0c…...