【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2

这篇具有很好参考价值的文章主要介绍了【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

3.2线性回归模型-part-2

Let’s look in this video at the process of how supervised learning works. Supervised learning algorithm will input a dataset and then what exactly does it do and what does it output? Let’s find out in this video. Recall that a training set in supervised learning includes both the input features, such as the size of the house and also the output targets, such as the price of the house. The output targets are the right answers to the model we’ll learn from. To train the model, you feed the training set, both the input features and the output targets to your learning algorithm.
在这个视频中,让我们来看一下监督学习的工作过程。我们将一个数据集输入到监督学习算法中,然后它究竟做了些什么?它的输出是什么?让我们在这个视频中一探究竟。回想一下,在监督学习中,训练集包括输入特征,例如房屋的大小,以及输出目标,例如房屋的价格。对于监督学习模型来说,输出的目标是我们给算法提供学习的正确答案。为了训练模型,你需要将训练集的输入特征和输出目标一起提供给学习算法。

Then your supervised learning algorithm will produce some function. We’ll write this function as lowercase f, where f stands for function. Historically, this function used to be called a hypothesis, but I’m just going to call it a function f in this class. The job with f is to take a new input x and output and estimate or a prediction, which I’m going to call y-hat, and it’s written like the variable y with this little hat symbol on top. In machine learning, the convention is that y-hat is the estimate or the prediction for y. The function f is called the model.
然后,你的监督学习算法将产生一个函数。我们将把这个函数写成小写的 f f f,其中 f f f 代表函数。从历史上看,这个函数过去被称为假设函数,但在本课程中,我将简单地称它为函数 f f f。函数 f f f 的作用是接收一个新的输入 x x x,并输出一个估计值或预测值,我将称之为 y-hat(读作:y帽),它用字母 y y y 加上一个小帽子符号上标来表示,即写作" y ^ \hat{y} y^“。在机器学习中,我们约定俗成将 y ^ \hat{y} y^表示 y y y 的估计值或预测值。函数 f f f 被称为模型。

X is called the input or the input feature, and the output of the model is the prediction, y-hat. The model’s prediction is the estimated value of y. When the symbol is just the letter y, then that refers to the target, which is the actual true value in the training set. In contrast, y-hat is an estimate. It may or may not be the actual true value.
x x x 被称为输入或者输入特征,而模型的输出是预测值 y ^ \hat{y} y^。模型的预测值是 y y y 的估计值。当符号只是字母 y y y时,那表示目标值,也就是训练集中的真实值。相反, y ^ \hat{y} y^ 是一个估计值。 y ^ \hat{y} y^可能是真实值,也可能不是真实值。

Well, if you’re helping your client to sell the house, well, the true price of the house is unknown until they sell it. Your model f, given the size, outputs the price which is the estimator, that is the prediction of what the true price will be.
如果你正在帮助你的客户出售房屋,那么直到出售之前,房屋的真实价格都是未知的。你的模型 f f f 根据房屋的大小输出价格,这就是估计值,即对真实价格的预测。
【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2,2022吴恩达机器学习,机器学习,笔记,线性回归
Now, when we design a learning algorithm, a key question is, how are we going to represent the function f? Or in other words, what is the math formula we’re going to use to compute f? For now, let’s stick with f being a straight line. You’re function can be written as f_w, b of x equals, I’m going to use w times x plus b. I’ll define w and b soon. But for now, just know that w and b are numbers, and the values chosen for w and b will determine the prediction y-hat based on the input feature x. This f_w b of x means f is a function that takes x as input, and depending on the values of w and b, f will output some value of a prediction y-hat.
现在,当我们设计一个学习算法时,一个关键问题是如何表示函数 f f f?换句话说,我们将使用什么数学公式来计算 f f f?现在,让我们将 f f f 视作一条直线(即一次函数)。你的函数可以写成 f w , b ( x ) = w x + b f_{w,b}(x)=wx+b fw,b(x)=wx+b. 我很快会就会定义 w w w b b b. 但现在,你只要知道 w w w b b b 是数字,并且给 w w w b b b赋的值将决定基于输入的特征 x x x的预测值 y ^ \hat{y} y^(他的意思是,不同的 w w w b b b能有不同的预测值 y ^ \hat{y} y^)。关于 x x x的函数 f w , b ( x ) f_{w,b}(x) fw,b(x)是一个以 x x x 为输入的函数,根据 w w w b b b 的值的不同, f f f 将输出某个预测值 y ^ \hat{y} y^.

As an alternative to writing this, f_w, b of x, I’ll sometimes just write f of x without explicitly including w and b into subscript. Is just a simpler notation that means exactly the same thing as f_w b of x. Let’s plot the training set on the graph where the input feature x is on the horizontal axis and the output target y is on the vertical axis. Remember, the algorithm learns from this data and generates the best-fit line like maybe this one here.
f w , b ( x ) f_{w,b}(x) fw,b(x)的有另一种简单的写法,即写成 f ( x ) f(x) f(x),不明确地包含 $w 和 b b b 的下标。这只是一个更简单的表示法,与 f w , b ( x ) f_{w,b}(x) fw,b(x)的意思完全相同。让我们将训练集绘制在图表上,其中输入特征 x x x 在横轴上,输出目标 y y y 在纵轴上。记住,算法从这些数据中学习,并生成最佳拟合线,可能就像这条线一样(图中蓝色的直线)。
【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2,2022吴恩达机器学习,机器学习,笔记,线性回归
Here’s what this function is doing, it’s making predictions for the value of y using a streamline function of x. You may ask, why are we choosing a linear function, where linear function is just a fancy term for a straight line instead of some non-linear function like a curve or a parabola? Well, sometimes you want to fit more complex non-linear functions as well, like a curve like this. But since this linear function is relatively simple and easy to work with, let’s use a line as a foundation that will eventually help you to get to more complex models that are non-linear.
这个函数的作用是使用一个关于 x x x的线性函数对 y y y 的值进行预测。你可能会问,为什么我们选择线性函数,而不是一些非线性函数,比如曲线或抛物线呢?线性函数只是直线的一个华丽说法。有时候你可能也想要拟合更复杂的非线性函数,比如这样的曲线(图中紫色曲线)。但由于线性函数相对简单且易于处理,让我们将直线作为学习的基础,它最终帮助你掌握更复杂的非线性模型。
【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2,2022吴恩达机器学习,机器学习,笔记,线性回归
More specifically, this is linear regression with one variable, where the phrase one variable means that there’s a single input variable or feature x, namely the size of the house. Another name for a linear model with one input variable is univariate linear regression, where uni means one in Latin, and where variate means variable. Univariate is just a fancy way of saying one variable.
更具体地说,这是一元线性回归,其中一元表示只有一个输入变量或特征 x x x,即房屋的大小。一元线性回归也可以称为具有单个输入变量的(univariate)线性模型,其中 uni在拉丁语中表示"一”,variate 表示"变量"。"一元"只是对一个变量的华丽说法。
【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2,2022吴恩达机器学习,机器学习,笔记,线性回归
In a later video, you’ll also see a variation of regression where you’ll want to make a prediction based not just on the size of a house, but on a bunch of other things that you may know about the house such as number of bedrooms and other features. By the way, when you’re done with this video, there is another optional lab. You don’t need to write any code. Just review it, run the code and see what it does. That will show you how to define in Python a straight line function. The lab will let you choose the values of w and b to try to fit the training data. You don’t have to do the lab if you don’t want to, but I hope you play with it when you’re done watching this video.
在后面的视频中,你还会看到一种回归的变体,它不仅仅基于房屋的大小进行预测,还要考虑到一大堆其他你可能了解的房屋信息,比如卧室的数量和其他特征。顺便说一下,当你完成这个视频后,还有一个可选的实验室。你不需要编写任何代码,只需查看并运行其中的代码,看看它是如何工作的。这将向你展示如何在 Python 中定义一个直线函数。实验室会让你选择 w w w b b b 的值,以尝试拟合训练数据。如果你不想做这个实验室,你不必强迫自己,但我希望你在观看完这个视频后能去尝试一下。

That’s linear regression. In order for you to make this work, one of the most important things you have to do is construct a cost function. The idea of a cost function is one of the most universal and important ideas in machine learning, and is used in both linear regression and in training many of the most advanced AI models in the world. Let’s go on to the next video and take a look at how you can construct a cost function.
这就是线性回归。为了使算法正常工作,你需要做的最重要的事情之一就是构建一个代价函数。代价函数的概念是机器学习中最普适和重要的想法之一,它既用于线性回归,也用于训练世界上许多最先进的人工智能模型。让我们继续下一个视频,看看如何构建一个代价函数。文章来源地址https://www.toymoban.com/news/detail-524145.html

到了这里,关于【2022吴恩达机器学习课程视频翻译笔记】3.2线性回归模型-part-2的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 吴恩达机器学习2022-Jupyter-用scikitlearn实现线性回归

    有一个开源的、商业上可用的机器学习工具包,叫做 scikit-learn。本工具包包含您将在本课程中使用的许多算法的实现。 您将利用 scikit-learn 以及 matplotlib 和 NumPy 中的函数。 Scikit-learn 的线性回归模型实现了一种封闭式的线性回归。 让我们使用早期实验室的数据——一栋1000平

    2024年02月16日
    浏览(33)
  • 吴恩达机器学习2022-Jupyter-用scikitlearn实现逻辑回归

    使用 scikit-learn 培训 Logit模型模型。 下面的代码导入了 scikit-learn 的 Logit模型模型。您可以通过调用 fit 函数将此模型适合于训练数据。 输出: 通过调用预测函数,您可以看到这个模型所做的预测。 输出: 您可以通过调用 score 函数来计算这个模型的精度。 输出:

    2024年02月16日
    浏览(28)
  • 【机器学习】机器学习笔记(吴恩达)

    https://github.com/fengdu78/Coursera-ML-AndrewNg-Notes https://www.bilibili.com/video/BV164411b7dx?p=4 https://study.163.com/course/courseLearn.htm?courseId=1210076550#/learn/video?lessonId=1280912351courseId=1210076550 定义机器学习为:在进行特定编程的情况下,给予计算机 学习能力的领域。目前存在几种不同类型的学习算

    2024年02月06日
    浏览(36)
  • 吴恩达机器学习2022-Jupyter-Scikit-Learn教学

    有一个开源的、商业上可用的机器学习工具包,叫做 scikit-learn。本工具包包含您将在本课程中使用的许多算法的实现。 在这个实验室里: 利用 scikit-学习使用线性回归梯度下降法来实现 您将利用 scikit-learn 以及 matplotlib 和 NumPy 中的函数。 Scikit-learn 有一个梯度下降法回归模型

    2024年02月16日
    浏览(25)
  • 吴恩达471机器学习入门课程2第2周——手写数字识别(0到9)

    使用神经网络来识别手写数字0-9。 本周,引入了一种新的激活函数,即修正线性单元(ReLU)。 a = m a x ( 0 , z )  ReLU函数 a = max(0, z) quadquadtext{ ReLU函数} a = ma x ( 0 , z )  ReLU 函数 讲座中的例子展示了ReLU的应用。在这个例子中,上下文感知能力不是二进制的,而是具有连续的

    2024年02月09日
    浏览(27)
  • 吴恩达471机器学习入门课程3第1周——K-means

    实现 K-means 算法,并将其用于图像压缩。 您将从一个样本数据集开始,帮助您获得 K-means 算法的工作概述 然后,您将使用 K-means 算法进行图像压缩,将出现在图像中的颜色数量减少到仅包括那些在该图像中最常见的颜色。 K-means 算法是一种自动将相似数据点聚合在一起的方

    2024年02月11日
    浏览(29)
  • 吴恩达机器学习2022-Jupyter特征缩放 1可选实验室: 特征缩放和学习率(多变量)

    在这个实验室里: 利用前一实验室开发的多变量线性回归模型程序 在具有多种功能的数据集上运行梯度下降法 探讨学习速度 alpha 对梯度下降法的影响 通过使用 z 分数标准化的特征缩放来提高梯度下降法的性能 您将使用在上一个实验中开发的函数以及matplotlib和NumPy。 与前面

    2024年02月16日
    浏览(37)
  • 吴恩达机器学习笔记:第 8 周-13 聚类(Clustering)13.1-13.2

    在这个视频中,我将开始介绍聚类算法。这将是一个激动人心的时刻,因为这是我们学习的第一个非监督学习算法。我们将要让计算机学习无标签数据,而不是此前的标签数据。 那么,什么是非监督学习呢?在课程的一开始,我曾简单地介绍过非监督学习,然而,我们还是有

    2024年04月22日
    浏览(37)
  • 【ChatGPT】吴恩达『提示工程』课程完全笔记下载

    版权说明:『ChatGPT Prompt Engineering for Developers』是DeepLearning.AI出品的免费课程,版权属于DeepLearning.AI(https://www.deeplearning.ai/)。 本文是对该课程内容的翻译整理,只作为教育用途,不作为任何商业用途。 吴恩达『开发者的提示工程』课程完全笔记(PDF) :https://github.com/youcan

    2024年02月02日
    浏览(32)
  • 吴恩达llama课程笔记:第七课llama安全工具

     羊驼Llama是当前最流行的开源大模型,其卓越的性能和广泛的应用领域使其成为业界瞩目的焦点。作为一款由Meta AI发布的开放且高效的大型基础语言模型,Llama拥有7B、13B和70B(700亿)三种版本,满足不同场景和需求。 吴恩达教授推出了全新的Llama课程,旨在帮助学习者全面

    2024年04月25日
    浏览(26)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包