AI, is intelligence demonstrated by computer systems · ML, is intelligence learned from example data and building a model · DL, is a type of ML techniques that use artificial neural networks
核心概念AI ⊃ ML ⊃ DL——三个嵌套的椭圆:AI 最外、ML 居中、DL 最内。
详细讲解三个定义的关键差别在于"智能从哪来"。AI(Artificial intelligence)只要求 computer systems 表现出智能,不限定实现方式——可以是人写死的规则(专家系统)。ML(Machine learning)要求智能是从 example data 里学来的,并表现为一个 model。DL(Deep learning)进一步限定:ML 的实现手段必须是 artificial neural networks。所以图是三层嵌套。反过来记更牢:所有 DL 都是 ML,所有 ML 都是 AI;但 AI 不一定是 ML(手写规则的专家系统),ML 不一定是 DL(决策树、k-means 聚类都不是神经网络)。
必要扩展课程大纲 Topic 1 的标题是 "Review of Fundamental Machine Learning Concepts",并明确要求比较 shallow learning 与 deep learning——"shallow" 指传统 ML(特征靠人工设计),"deep" 指用多层网络自动学特征(见 p29–p30)。
易错点 · 理解提示三个定义建议用英文原句背。短答题 "Define deep learning" 的满分答案就是第三条:a type of ML techniques that use artificial neural networks。
p.5What machine learning is(定义)★定义题
Learn from (past) data to perform useful tasks, e.g. predicting (future) values, without using specific algorithms · seen data → model → unseen data · No need to design/program a specific algorithm
核心概念从(过去的)数据中学习以完成有用任务(例如预测未来的值),而不需要为手头的问题专门设计算法;监督学习用 seen data 建模型,去预测 unseen data 的结果。
详细讲解这段定义最容易被误解的是 "without using specific algorithms"。它不是说机器学习没有算法——梯度下降(p38)本身就是算法——而是说:你不需要为"预测分数"这个问题专门手写一套规则,规则(模型)是从数据里自动总结出来的。第二个要点是 seen data → model → unseen data:用见过的数据建模型,去预测没见过的数据的结果。这个"见过 → 没见过"的跳跃叫泛化(generalization),是整个机器学习的核心难题,到 Unit 6–7 讲 train / validation / test 时正式展开。
易错点 · 理解提示答题写定义要带上 "from data" 和 "build a model" 两个关键词,漏掉任何一个都会被扣分。
p.6The term "machine learning"(一词的来历)常识题
Coined by Arthur Samuel, IBM, in 1959 · a program that played the game of checkers · He was not good at checkers! · The program learned by itself, and beat Samuel and checkers champions
核心概念"machine learning" 一词由 IBM 的 Arthur Samuel 于 1959 年提出;他写了一个下跳棋(checkers)的程序,程序通过自学击败了他本人和跳棋冠军。
详细讲解这个例子是整门课的"精神来源"。Samuel 写了一个下跳棋的程序,但他自己棋艺并不好——关键在于这不妨碍程序变强:程序通过大量对局,从结果中学习哪些走法更好,最终击败了 Samuel 本人乃至跳棋冠军。它证明了一件事:只要机器能从"做过的尝试和得到的结果"里改进,写程序的人就不必是领域专家。这正是今天你不需要懂"猫长什么样"的规则,也能训练出猫狗分类器的原因。
必要扩展因为知识在 Model 里而不在代码里,所以同一个 Keras 程序换一份数据就能做完全不同的任务——这就是 p9 说的"便于定制化"。
易错点 · 理解提示考试画图题:务必画出两个虚线框并标 Training / Prediction,箭头方向别反(Examples → ML → Model;Data → Model → Result)。
p.8Enabling technologies(为什么是 2010 年代)★短答题
Much about ML/DL was known long ago; why do ML/DL succeed in 2010s but not earlier? · High processing power and cheap GPUs · Fast, large, cheap data storage · Massive available data, e.g. on the Web · New and improved algorithms and practices
易错点 · 理解提示短答题 "Why did ML/DL succeed in the 2010s but not earlier?" 的标准答案就是这四条,用英文关键词作答:GPUs / storage / massive data / improved algorithms。
p.9Benefits of ML (Google)
Reduce development time · Facilitate software customization for users · Help solve problems that we don't know how to solve manually
核心概念ML 的三大好处:缩短开发时间 · 便于定制化 · 解决人们不知道如何手动解决的问题。
详细讲解每条好处都配了同一个例子(语法检查器)的三种情境。① Reduce development time:获取大量"语法错误"的数据,比请语言专家写出所有语法规则容易得多。② Facilitate software customization:要适配另一种语言,只需换一批数据重新训练,而不是重写规则。③ Help solve problems we don't know how to solve manually:有些问题人根本写不出规则——图像分类就是典型,没有人能用 if-else 描述"什么是猫";但用数据训练模型却能做到。第三条最本质,前两条其实是它的副产品。
Data have a critical role in all ML systems · Data collection and preparation may take up 50% to 70% of resources in an ML project · Many data terminologies (features, labels, samples) applicable to other types of ML
核心概念数据在所有 ML 系统中起关键作用;数据收集与准备可能占项目资源的 50%–70%。
详细讲解初学者以为机器学习 = 调模型,实际项目里最花时间的是拿数据、清洗数据、标注数据。原因有二:模型只能学到数据里有的东西(garbage in, garbage out),而标注往往需要人工(p16 会讲为什么贵)。讲义还提醒:features、labels、samples 这些术语虽然是在监督学习里定义的,但同样适用于其他类型的 ML——所以花时间把它们弄清楚是划算的。
详细讲解讲义用两个贯穿全讲的例子:收入预测(income prediction)的 features 有姓名、年龄、身高、受教育程度和年限;垃圾邮件检测(spam detector)的 features 有邮件正文、发件人地址、邮件长度。六个名字都要认识:统计学里叫 independent variables(自变量),因为它们是"输入";dimensions(维度)在数据表里指"一列"。注意 features 可以是文本(正文、姓名)、数值(年龄、长度)、类别(是否说法语)——类型本身不限制它能否做特征。
Examples: input data to a ML algorithm · Also called observations, instances, cases, data tuples, data objects, and data points · Training set: a set of labelled examples (features + label) · Test set: a set of unlabelled examples (features only)
核心概念examples 是输入 ML 算法的数据;又叫 observations、instances、cases、data tuples、data objects、data points。training set = labelled examples 的集合;test set = unlabelled examples 的集合(只有 features),用于模型评估和预测。
详细讲解一个 example 就是"一行数据"——一个人、一封邮件、一张图(p17 的表格会让这个概念一目了然)。六个同义词在教材里都有,认得即可。重点是两个集合的划分:training set 的每个样本 = features + label,用来训练;test set 的每个样本只有 features,用来评估和预测。为什么训练集必须带 label?因为模型靠"预测与答案的差距"来学习(p37 的 error)。为什么测试集不给 label?因为要模拟真实使用场景——新来的数据没有答案。
题目 / Tut / Lab 关联项目 Task 1 明确规定:25,000 张带标签训练图再分成 training set 与 validation set,5,000 张测试图作 test set——这是 p32 说的 "three sets" 版本,Unit 6–7 会讲。试卷 Q8 用 training accuracy 与 validation accuracy 的差别判断过拟合。
必要扩展实际研究中 test set 通常也有标签(否则无法算准确率),只是训练时不用它。讲义定义强调"只有 features",是从"输入模型"的角度说的;答题按讲义原文,可补一句 "labels are used for evaluation"。
易错点 · 理解提示别把 example 和 feature 混为一谈:一个 example 包含多个 features(试卷 Q7:一个 sample 有 8 个 features)。
p.16Using examples(特征相关性、样本数量与成本)
Some features are more relevant and important · Feature selection or extraction is key in data preprocessing · In general, using more examples improves a model's performance · But it is expensive to obtain lots of examples, especially their labels
易错点 · 理解提示⚠️ Name 这一列是 feature(p18 明确把它写进 x₁),别漏数——所以是 5 个 features 而不是 4 个。蓝框 = 讲义圈出的 "An example"(一行),绿框 = 讲义圈出的 "A feature"(一列),红框 = label。
p.18Feature matrix and feature vector(记号)★试卷 Q7a
A feature matrix denotes the features of a dataset as a matrix · 𝐗₃ₓ₅ = [Peter 20 1.75 12 No; Mary 35 1.62 20 Yes; David 33 1.70 16 No] · 𝐱 denotes the feature vector of a general example · 𝐱₁ = Peter 20 1.75 12 No
核心概念feature matrix X 用矩阵表示整个数据集的 features:3 个 examples × 5 个 features 写成 X₃ₓ₅;feature vector x 是一个 example 的 features;x₁ 是第 1 个 example 的 features。
详细讲解记号约定:大写粗体 X = 整个数据集的 features(矩阵),小写粗体 x = 一个样本的特征向量,带下标的 x₁、x₂、x₃ 分别是第 1、2、3 个样本。矩阵的形状读作 "3-by-5":(样本数, 特征数) = (3, 5)。每一行对应一个样本,每一列对应一个特征,所以 X 的第 i 行就是 xᵢ。这个"行 = 样本、列 = 特征"的约定贯穿整门课,Keras 里 fit(X, y) 的 X 也按此排列。
X = x₁ → Peter 20 1.75 12 No x₂ → Mary 35 1.62 20 Yes x₃ → David 33 1.70 16 No 形状 (3, 5) = (n 个样本, d 个特征)
Two main types of data in ML · Each of features and labels can be either categorical and numerical · Different types of labels demand different ML models and algorithms
Categorical feature or label is a data field that can take on a finite number of possible values (classes or categories) · Also called a discrete variable
详细讲解定义的关键词是 finite number of possible values:取值范围是有限的、可列举的。最常见的是二值(Yes / No、spam / not spam)。例子:收入预测里"是否说法语"、垃圾邮件检测里"是否垃圾邮件"(这是输出)。注意类别之间没有大小或顺序关系——"说法语"并不比"不说法语"大。
Numerical feature or label is a data field that has a numerical value (integer or floating point) · Often take on an infinite number of possible values · Also called a continuous variable
详细讲解数值型的本质是"可以做算术":求平均、比大小都有意义。例子:身高、受教育年限(features),收入(label),邮件长度(feature)。讲义用 "often take on an infinite number of possible values"——是"常常"而不是"一定",因为整数这种可数的取值也是数值型。
p.23Classification and regression(分类与回归)★试卷 Q1 原题出处
There are two types of supervised ML · Classification is predicting a categorical label · Binary/binomial: label in 1 of 2 classes · Multiclass/multinomial: label in 1 of ≥ 3 classes · Regression is predicting a numerical label
易错点 · 理解提示考试问 "types of ML" 答三类;问 "types of supervised ML" 答两类(classification、regression)——别答串。
p.25Supervised learning(监督学习)★复习课点名
Supervised learning is to make predictions using a model that associates input data (features) with output data to predict (labels) · Classification: spam detection, image classification, cancer diagnosis · Regression: predicting income from personal particulars, predicting the price of real estate
核心概念用一个把 features 与 labels 关联起来的模型做预测;两类:classification(垃圾邮件、图像分类、癌症诊断)与 regression(收入、房价)。
详细讲解定义的关键词是 associates:模型学的就是"输入 → 输出"的映射(association)。讲义给的例子值得全记——classification:spam detection, image classification, cancer diagnosis;regression:predicting income from personal particulars, predicting the price of real estate。这些例子在考试题干里会"换皮"出现(试卷 Q1 的"预测等级 / 租车数 / 欺诈"就是换了三个场景)。
Reinforcement learning is to develop a system (an agent) that improves performance by interacting with the environment · The agent performs actions, while the environment has states and provides rewards · E.g. a chess engine
详细讲解前三部分讲的是整个 ML 领域;从 p29 起,镜头推到 DL——这门课的主角。只有两页:p29 给定义和"逐层提取特征"的核心思想;p30 补充三个性质(三类任务都能用、自动特征、适合大数据)。p4 那个最内圈的椭圆在这里被展开。
题目 / Tut / Lab 关联课程大纲 Topic 1 明确写了 "Comparison between shallow and deep learning"——所以 p29–p30 可能以短题出现。
必要扩展后续 Unit 2–12 讲的都是 DL 的各种架构(DNN、CNN、RNN、autoencoder、GAN)。
易错点 · 理解提示把 p29 的定义与 p4 的第三条 bullet 对照着背,两者是同一句话。
p.29Deep learning(定义与逐层特征)★定义题原图
Deep learning is a type of ML technique that uses artificial neural networks, ANN or NN · It uses multiple layers of operations to gradually convert raw features to higher-level, more complex, and more meaningful features · E.g. in image classification, layers of deep learning turn feature of raw pixels to lines
核心概念DL 是使用人工神经网络(ANN or NN)的 ML 技术;用多层运算把 raw features 逐步转换为 higher-level、更复杂、更有意义的 features;图像分类里:raw pixels → lines → …
Can be used in supervised, unsupervised, and reinforcement learning tasks · Automatic discovery of high-level features alleviating the need for selecting and extracting features · Particularly suitable for complex machine learning problems that involve huge amounts of data · May ... involve tens or hundreds of layers
详细讲解三条性质逐条理解。① "Can be used in supervised, unsupervised, and reinforcement learning tasks"——DL 是方法,三类任务是问题类型,二者是正交的:别把 "DL" 与 "supervised learning" 当成并列的两类(p24 的三类是 ML 的分类,DL 只是 ML 的子集,p4)。② "Automatic discovery of high-level features"——好处是省去人工特征工程(对比 p16);代价是需要更多数据。③ "Particularly suitable for … huge amounts of data"——层多、参数多,小数据容易过拟合;可能几十到几百层,所以叫 deep。
必要扩展短题 "State two advantages of deep learning over traditional ML":automatic feature discovery;suitable for complex problems with huge amounts of data。反过来问缺点:需要大量数据与计算能力。
Labelled examples (features plus labels) are input into an algorithm to train a model, which is then used to make predictions from unlabelled examples · 1) Partition examples into a training set and a test set · 2) Train, or fit, the model using the training set · 3) Evaluate the model using the test set · A more robust process splits examples into three sets
核心概念把 labelled examples 输入算法来训练模型,再用模型对 unlabelled examples 预测。基本流程三步:① 切分 training set / test set → ② 用 training set 训练(train / fit)→ ③ 用 test set 评估。更稳健的流程切三个集合(后面讲)。
详细讲解三步流程里有两个考点。第一,"train" 与 "fit" 是同义词——sklearn 和 Keras 的方法都叫 fit(),讲义用 train,考试两个词互换。第二,为什么必须先切分再训练?因为评估必须在模型"没见过"的数据上做(p5 的 unseen data),否则模型把训练数据背下来也能拿高分——这就是过拟合(试卷 Q8:Model A 训练准确率 96%、验证准确率只有 60%)。"A more robust process splits examples into three sets" 指 training / validation / test:validation 用来调超参数和判断何时停止训练,test 只在最后用一次——Unit 6–7 讲。
① Partition 切成 training set 与 test set
→
② Train / fit 用 training set 训练模型
→
③ Evaluate 用 test set 评估
题目 / Tut / Lab 关联项目 Task 1 的要求就是这段话的实践:"divide the 25,000 training images into the training set and the validation set … use the 5,000 test images as the test set"。试卷 Q8a–c:判断 underfitting / overfitting 必须同时看 training 与 validation accuracy。
必要扩展代码层面常用 train_test_split(X, y, test_size=0.3)(scikit-learn)完成第一步;Keras 的 validation_split 或 validation_data 参数对应"三个集合"。
1) Observe that the data points roughly lie on a straight line · 2) Draw a straight line that best fits the points · 3) Use the line to read the score for studying 15 hours
核心概念合理的人类思路:① 观察到数据点大致在一条直线上 → ② 画一条最拟合的直线 → ③ 用这条直线读出 15 小时对应的分数。
详细讲解这三步看似平常,其实分别对应机器学习的三件事:第 ① 步是选模型(假设 feature 与 label 线性相关——p36 的 linear regression);第 ② 步是训练("best fits"需要一个好坏标准 p37 + 一个寻找方法 p38);第 ③ 步是预测(把 x = 15 代入方程 p51)。人类靠目测完成第 ② 步,机器需要把"目测"量化。这三步是理解 p36–p51 的纲。
必要扩展如果第 ① 步观察到的不是直线而是曲线(例如分数随小时数先快后慢),就应换非线性模型(例如多项式回归或神经网络)。
易错点 · 理解提示第 ① 步是一个假设(assumption)——线性回归 "works when features are linearly related to the label"(p36 原文)。
p.36ML straight line model: linear regression★核心公式原图
Linear regression is a ML model that works when features (xᵢ) are linearly related to the label (y) · Simple linear regression has 1 feature: y = mx + b, where m is slope and b is y-intercept, e.g. score = m × hour + b · To train the model means to determine the best values for m and b · Multiple linear regression: y = m₁x₁ + m₂x₂ + m₃x₃ + ⋯ + b
核心概念linear regression 适用于 features (xᵢ) 与 label (y) 线性相关的情形;simple linear regression 只有 1 个 feature:y = mx + b(m 斜率,b y 轴截距),例:score = m × hour + b;训练 = 找到最好的 m 和 b;multiple linear regression:y = m₁x₁ + m₂x₂ + m₃x₃ + ⋯ + b。
详细讲解人类"画一条直线",在数学上就是确定两个数:m 和 b——它们是这个模型要学的全部参数(parameters)。看讲义的三幅小图:左图 y = mx + b——横坐标走 1 个单位、纵坐标上升 m(斜率),直线与 y 轴交于 b(截距);中图一组平行线,箭头 b 表示"b 变大 → 直线整体上移,斜率不变";右图几条绕同一点旋转的直线,箭头 m 表示"m 变化 → 直线旋转"。所以"找最好的直线" = 在所有 (m, b) 组合里挑一对。"simple" 的意思是只有 1 个 feature,不是"简单";有多个 feature 时叫 multiple linear regression,每个 feature 配一个系数。
讲义 p36 三幅小图(重绘):左 = 斜率 m 与截距 b;中 = 改变 b 使直线上下平移;右 = 改变 m 使直线旋转。
易错点 · 理解提示m 是斜率、b 是截距,别写反。"训练 = 确定 m 和 b 的值"这句话是 p40 "parameter vs hyperparameter" 的基础。
p.37ML model goodness: prediction errors(误差与 MSE)★核心公式原图
Prediction error is the difference between predicted and actual values · Provide a performance measure of the machine learning model · Form the loss function or cost function of the model · Mean squared error: MSE = (1/n) Σ (yᵢ − yᵢ′)²
核心概念prediction error = 预测值与实际值之差,是模型性能的度量;误差汇总成 loss function / cost function;MSE = (1/n) Σ (yᵢ − yᵢ′)²(yᵢ 实际值,yᵢ′ 预测值,n 预测个数)。
详细讲解看图:实心点是 actual value y,空心点是 predicted value y′(落在直线上),两者之间的竖直距离就是 Error——预测偏高或偏低都会产生误差。但"误差"有正有负,单看每个样本的误差无法比较两条直线谁更好。于是需要一个汇总指标:把所有误差平方后求平均,这就是 Mean Squared Error。为什么平方?① 正负误差不会互相抵消;② 大误差受到更重的惩罚;③ 平方函数处处可导,便于求梯度(p38 的梯度下降需要导数)。为什么除以 n?让数值与样本数量无关,便于不同数据集之间比较。MSE 越小,直线拟合得越好。
MSE = (1/n) · Σi=1..n (yi − yi′)² yi = actual value · yi′ = predicted value · n = number of predictions
p.38ML finding the best: gradient descent optimizer★复习课点名原图
Gradient descent is an optimizer that determines optimal parameter values in iterations · Update parameters to reduce loss function · Use the slope, or gradient, of the curve at the current parameter value · Negative gradient → increase parameter · Positive gradient → decrease parameter
核心概念gradient descent 是一种 optimizer,在迭代中确定最优参数值——更新参数以降低 loss function;用当前参数值处曲线的斜率(gradient):负梯度 → 增大参数;正梯度 → 减小参数。
详细讲解先看懂图的坐标轴:横轴是参数(例如 m 的取值),纵轴是loss(把每个 m 代入 MSE 算出的损失)——这条碗形曲线不是数据散点图,而是"参数好坏地图"。三张小图讲了一个完整故事:① 小球在左壁,往左还是往右?② 左壁的切线是下坡(negative slope),往右走 loss 下降 → "increase parameter";③ 小球在右壁,切线上坡(positive slope),往左走 → "decrease parameter"。把两种情况合成一个公式:新参数 = 旧参数 − 学习率 × 梯度。梯度为负时,"减去一个负数"就是增大;为正时就是减小——符号自动给出正确方向。因为每一步只看"当前位置的斜率",所以必须迭代,一步一步走向碗底。
new parameter = old parameter − learning rate × gradient (本讲两个参数:m 和 b 各更新一次)
Learning rate is the amount of change to increase or decrease a parameter value · Too small the learning rate → learning is too slow to obtain useful parameter values in practical time · Too large the learning rate → parameter values bounce and algorithm does not learn
Variables or settings of training or optimization algorithm that creates or learns a ML model · E.g. the learning rate and the number of iterations of gradient descent · Usually set manually before the algorithm executes · May also be adjusted automatically by the algorithm
p.45Normalization, training set and test set★试卷 Q6🧮
Normalization is to scale data values to smaller and similar ranges · Min-max normalization to range [0, 1]: x′ = (x − min x) / (max x − min x) · Needed for many ML algorithms, but we skip it here for simplicity · In a practical ML task, the data should be divided into a training set and test set (e.g. 70% vs 30%) · We don't split the tiny dataset here as it has only 10 examples
核心概念normalization 把数据缩放到较小且相近的范围,例如 min-max 归一化到 [0, 1]:x′ = (x − min x)/(max x − min x);很多算法需要,但这里为简单起见跳过。实际任务要把数据分成 training set 和 test set(如 70% vs 30%);这个数据集只有 10 个 examples,所以不切分:x_train = x_test = hours、y_train = y_test = scores。
详细讲解三个要点。 ① 公式手算:hours 的 min = 4、max = 16,分母 = 12。x′(4) = 0;x′(16) = 1;x′(8) = (8 − 4)/12 = 0.333。归一化后所有特征都落在 0–1,不同量纲的特征"平等"。 ② 为什么很多算法需要?对梯度下降而言,特征尺度不均匀会让 loss 碗变成一条"狭长的斜沟":有的方向陡、有的方向缓,学习率只能按最陡的方向选小值,缓的方向就走得很慢。本讲恰恰因为这个原因收敛很慢——我复算:不归一化时 lr = 0.005 跑 1000 轮 MSE 才到 15.54;把 x 归一化后用 lr = 0.1,只跑 400 轮就到 14.635(约快 25 倍),而且换算回原尺度仍是 m = 4.2893、b = 9.2519。讲义说 "skip it here for simplicity",代价就是 p49 要跑 10000 轮。 ③ 切分:70% / 30% 对 10 个样本来说是 7 个和 3 个,太少;所以这里四个名字指向同一个数组(Python 的"别名",不是复制)。后果是 p49 表里的 error 是在训练数据上算的,严格说叫"训练误差"而不是"测试误差"。
x′ = (x − min x) / (max x − min x) → 归一化后 x′ ∈ [0, 1]
题目 / Tut / Lab 关联试卷 Q6(把图像特征缩放到 0–1、reshape、one-hot)正是"归一化"的实战版;Lab 1 的 min / max / mean(arr.max()、np.mean)是算 min-max 的工具;Unit 6–7 讲数据集切分与验证集。
必要扩展若 y 是二维数组,len(y) 返回行数;更稳妥的写法是 y.size(Lab 1 Q2c 用过)。
易错点 · 理解提示参数顺序 (y, y2) = (实际, 预测);由于平方,顺序不影响结果。
p.47Computing gradients and learning rate(梯度代码)★核心🧮手算
MSE = (1/n) Σ (yᵢ − (m xᵢ + b))² · Gradients of m and b can be calculated using calculus · Learning rate is the amount of update to the parameters · gradient_descent_step
def gradient_descent(x, y, learning_rate, iterations, initial_m=0, initial_b=0):
m = initial_m
b = initial_b
for i in range(iterations): # 迭代 iterations 次
m, b = gradient_descent_step(m, b, x, y, learning_rate)
return m, b
def predict_error(m, b, x, y):
predicted = m * x + b
error = mean_squared_error(y, predicted) # 调用 p46 的函数return predicted, error
用当前参数处的梯度迭代更新参数以降低 loss:new = old − lr × gradient;负梯度 → 增大参数。learning rate 与 iterations 是 hyperparameters。
3. 必背英文定义(短问题用)
#
术语
一句话英文定义(页码)
1
AI / ML / DL
AI: intelligence demonstrated by computer systems. ML: intelligence learned from example data and building a model. DL: a type of ML techniques that use artificial neural networks.(p4)
2
Features
data input into a model for making predictions(= attributes, properties, independent variables, dimensions, covariates)(p13)
3
Labels
results predicted by a model(= dependent variables, target variables, responses)(p14)
4
Examples / training set / test set
Examples: input data to an ML algorithm. Training set: a set of labelled examples. Test set: a set of unlabelled examples (features only).(p15)
5
Categorical / Numerical
Categorical: a data field that can take on a finite number of possible values (discrete). Numerical: a data field that has a numerical value (continuous).(p21–p22)
6
Classification / Regression
Classification: predicting a categorical label (binary: 1 of 2 classes; multiclass: 1 of ≥ 3 classes). Regression: predicting a numerical label.(p23)
7
Supervised / Unsupervised / Reinforcement
Supervised: make predictions using a model that associates features with labels. Unsupervised: identify patterns from (unlabelled) data. Reinforcement: an agent improves performance by interacting with the environment (actions, states, rewards).(p25–p27)
8
Linear regression
a ML model that works when features are linearly related to the label: y = mx + b; training means determining the best values for m and b.(p36)
9
MSE
Mean squared error = (1/n) Σ (yᵢ − yᵢ′)², yᵢ actual, yᵢ′ predicted, n number of predictions.(p37)
10
Gradient descent / Learning rate
Gradient descent: an optimizer that determines optimal parameter values in iterations. Learning rate: the amount of change to increase or decrease a parameter value.(p38–p39)
11
Hyperparameters
variables or settings of the training or optimization algorithm, e.g. learning rate, number of iterations; usually set manually before training.(p40)
12
Why DL in the 2010s
high processing power and cheap GPUs; fast, large, cheap storage; massive available data; new and improved algorithms and practices.(p8)
4. 易错点 Top 10
DL ≠ 监督学习:DL 是 ML 的子集(p4),三类任务都能用(p30);classification / regression 只是监督学习的子类(p24)。