数据科学中的简单线性回归

简单线性回归 (Simple Linear Regression)

A simple regression model could be a linear approximation of a causative relationship between two or additional variables. Regressions models are extremely valuable, as they're one in every of the foremost common ways that to create inferences and predictions.

一个简单的回归模型可以是两个或其他变量之间的因果关系的线性近似。 回归模型非常有价值,因为它们是创建推论和预测的所有最常见方式之一。

The process goes like this. You get sample data, come back up with a model that explains the data and so create predictions for the total population supported the model you've developed.

这个过程是这样的。 您将获得样本数据,然后使用一个解释数据的模型,从而为支持您开发的模型的总人口创建预测。

There is a variable, labeled Y, being foreseen, and freelance variables, tagged x1, x2, so forth. These are the predictors. Y could be a perform of the X variables, and also the regression model could be a linear approximation of this perform.

可以预见有一个标记为Y的变量,还有一个标记为x1x2的自由变量。 这些是预测因素。 Y可以是X变量的执行,并且回归模型可以是该变量的线性近似。

The easiest regression model is that the straightforward linear regression: Y is up to beta zero and beta one-time x plus epsilon.

最简单的回归模型是简单的线性回归: Y最高为beta 0和beta的x乘以 epsilon。

Let's see what these values mean. Y is that the variable we tend to are attempting to predict and is termed the variable. X is a variable quantity. Once exploitation multivariate analysis, we wish to predict the worth of Y, provided we have the worth of X.

让我们看看这些值的含义。 Y是我们倾向于尝试预测的变量,称为变量。 X是一个变量。 一旦进行了多变量分析,我们希望预测Y的价值,前提是我们拥有X的价值。

But to possess a regression, Y should depend upon X in some causative manner. Whenever there's a modification in X, such modification should translate into a change in Y.

但是要拥有回归, Y应该以某种原因依赖于X。 每当X中有修改时,此类修改应转换为Y中的更改。

simple linear regression

Think about the subsequent equation: the financial gain an individual receives depends on the number of years of education that a person has received. The variable is financial gain, whereas the variable quantity is years of education. There's a causative relationship between the 2. The additional education you get, the upper the financial gain you're possible to receive. This relationship is therefore trivial that it's in all probability the explanation you're observing this course, right now. You would like to urge better financial gain, therefore you're increasing your education.

考虑下面的等式 :一个人获得的经济收益取决于一个人受教育的年限。 变量是财务收益,变量是教育年限。 两人之间存在因果关系。您获得的额外教育越多,您可以获得的经济收益就越高。 因此,这种关系是微不足道的,因为它很可能是您目前正在观察的此过程的解释。 您想敦促获得更好的经济收益,因此您正在增加学历。

Now, let's pause for a second and have faith in the reverse relationship. What if education depends on financial gain. This might mean the upper your financial gain, the additional years you pay educating yourself. Golf shot high tuition fees aside, wealthier people don't pay additional years in class. And, highschool and faculty take a similar range of years, regardless of your income bracket. Therefore, a causative relationship like this one is faulty, if not plain wrong. Hence, it's unfit for multivariate analysis.

现在,让我们暂停片刻,并对反向关系充满信心。 如果教育取决于经济收益该怎么办。 这可能意味着您的经济收益越高,您自学的额外年限就越多。 高尔夫除了高额的学费外,较富裕的人无需再上课。 而且,无论您的收入水平如何,高中和教师的年限都差不多。 因此,即使不是完全错误的,这种因果关系也是错误的。 因此,它不适合进行多元分析。

Let's return to the initial example. Financial gain could be a performance of education. The additional years you study, the upper financial gain you'll receive. This sounds regarding right.

让我们回到最初的示例。 经济收益可能是教育的表现。 学习了额外的几年,您将获得最高的经济收益。 这听起来是对的。

好的 (Alright)

What we haven't mentioned, so far, is that, in our model, there are coefficients. Beta one is the constant that stands before the variable quantity. It quantifies the result of education on financial gain. If beta one is fifty, then for every further year of education, your financial gain would grow by $50. In the USA, the amount is way larger, somewhere around three to 5,000 bucks. So, for every further year you pay on education, your yearly financial gain is predicted to rise by 3 to 5 thousand bucks. And that's not considering pedagogy or tailored courses, like this one.

到目前为止,我们还没有提到的是,在我们的模型中,存在系数。 Beta 1是位于变量前的常数。 它量化了关于经济收益的教育结果。 如果beta 1是50,则每一年的教育,您的经济收益将增加50美元。 在美国,这笔钱要大得多,大约三到五千美元。 因此,您为教育付出的每一年,预计您的年度财务收益将增加3到5,000美元。 而且,这并不是在考虑像这样的教学法或量身定制的课程。

The different 2 other parts are the constant beta zero and also the error – epsilon.
In this example, you'll be able to consider the constant beta zero because of the pay. Regardless of your education, if you have got employment, you'll get the pay. This is often a secured quantity.

其他2个部分分别是常数beta 0和误差– epsilon
在此示例中,由于报酬,您将能够考虑常数beta 0。 无论您受过什么教育,如果您有工作,就可以获得报酬。 这通常是安全数量。

So, if you have never visited the college and plug an education worth of zero years within the formula, the regression can predict that your financial gain is going to be the pay smart, right?

因此,如果您从未上过大学,并在公式中加入了零年制的教育费用,则回归分析可以预测您的财务收益将是明智的报酬,对吗?

The last term is epsilon. This represents the error of estimation. The error is that the actual distinction between the determined financial gain and also the income the regression foreseen. On average, across all observations, the error is zero. If you earn over what the regression has foreseen, then somebody earns but what the regression has foreseen. Everything evens out.

最后一个词是epsilon。 这代表估计误差。 错误是确定的财务收益与预计的回归收益之间的实际区别。 平均而言,在所有观察中,误差为零。 如果您获得的收益超过了回归的预期,那么有人会赚钱,但回归的收益却是预期的。 一切都变得平稳。

(Formula)

The original formula was written with Greek letters. What will this tell us? it was the population formula. However, we all know statistics are all regarding sample information. In follow, we tend to use the statistical regression equation.

原始公式用希腊字母书写。 这将告诉我们什么? 这是人口公式。 但是,我们都知道统计数据都是关于样本信息的。 接下来,我们倾向于使用统计回归方程。

It is merely y hat equals b zero plus b one time x.

仅仅是y等于b零加b 乘以x

You detected right. The y here is noted as y hat. Whenever we have a hat image, it's calculable or a foreseen worth.

您检测正确。 此处的y表示为y帽子。 每当我们有帽子图像时,它都是可以计算或可以预见的。

b zero is that the estimate of the regression constant beta zero, whereas b one is that the estimate of beta one, and x is that the sample information for the variable quantity.

b零是回归常数β0的估计,而b 1是β1的估计, x是变量的样本信息。

翻译自: https://www.includehelp.com/data-science/simple-linear-regression.aspx

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/544109.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

鹅厂一面,有关 ThreadLocal 的一切

1. 底层结构ThreadLocal 底层有一个默认容量为 16 的数组组成,k 是 ThreadLocal 对象的引用,v 是要放到 TheadLocal 的值public void set(T value) {Thread t Thread.currentThread();ThreadLocalMap map getMap(t);if (map ! null)map.set(this, valu…

再战“超融合”,戴尔、Nutanix绝世好CP

从进入PC领域开始,戴尔一直在扮演颠覆者的角色。戴尔的理想是以开放、标准化的技术和解决方案颠覆传统的封闭的技术和市场,实现与合作伙伴的共赢。在超融合架构逐渐兴起的今天,戴尔依旧希望以变革者的身份,携手超融合架构的先驱Nu…

ruby array_Ruby中带有示例的Array.index()方法

ruby arrayArray.index()方法 (Array.index() Method) In this article, we will study about Array.index() method. You all must be thinking the method must be doing something which is related index of certain element. It is not as simple as it looks. Well, we w…

面试突击58:truncate、delete和drop的6大区别!

作者 | 磊哥来源 | Java面试真题解析(ID:aimianshi666)转载请联系授权(微信ID:GG_Stone)在 MySQL 中,使用 truncate、delete 和 drop 都可以实现表删除,但它们 3 个的使用场景和执行…

scala 去除重复元素_Scala程序从列表中删除重复项

scala 去除重复元素List in Scala is a collection that stores data in the form of a liked-list. The list is an immutable data structure but may contain duplicate elements. And in real life implementation duplicate elements increase the runtime of the program…

智力游戏

【Description】whitecloth 最近迷上了一个你小时候已经玩厌了的游戏:移火柴棒。他现在吵着要你陪他玩,你没有办法,只好写一个程序来完成这个工作了。你被给出了一个火柴拼成的等式,比如说下面这个:( 5 7 …

面渣逆袭:MySQL六十六问!建议收藏

基础MySQ Logo作为SQL Boy,基础部分不会有人不会吧?面试也不怎么问,基础掌握不错的小伙伴可以跳过这一部分。当然,可能会现场写一些SQL语句,SQ语句可以通过牛客、LeetCode、LintCode之类的网站来练习。1. 什么是内连接…

C ++中带有示例的llabs()函数

C llabs()函数 (C llabs() function) llabs() function is a library function of cstdlib header. It used to get the absolute of the given value. This function is similar to the abs() and labs() functions except for the type of the parameter, it is used for th…

Mysql+Heartbeat+Drbd生产环境高可用部署若干问题解惑

MysqlHeartbeatDrbd生产环境高可用部署若干问题解惑:############################################################## Purpose: MysqlHeartbeatdrbd高可用部署中学生的几个疑惑解答## USER YYYY-MM-DD – ACTION # Oldboy 2011-3-14 – Created# …

try-with-resources 中的一个坑,注意避让

小伙伴们好呀,昨天复盘以前做的项目(大概有一年了),看到这个 try-catch ,又想起自己之前掉坑的这个经历 ,弄了个小 demo 给大家感受下~ 😄问题1一个简单的下载文件的例子。这里会出现什么情况…

c++ abort 函数_C ++中带有示例的abort()函数

c abort 函数C abort()函数 (C abort() function) abort() function is a library function of cstdlib header. It is used to abort the current process. For the abnormal program termination – we can use abort() function. abort()函数是cstdlib标头的库函数。 用于中…

第 二 十 八 天 :LB 负 载 均 衡 搭 建 之 LVS

小Q:抱怨,是一种负能量,犹如搬起石头砸自己的脚,与人无益,于己不利,于事无补 前面我们介绍了HA高可用集群,今天我们来了解下LB负载均衡集群,在学习完基本的搭建后,在扩展…

一个依赖搞定Spring Boot 配置文件脱敏

经常会遇到这样一种情况:项目的配置文件中总有一些敏感信息,比如数据源的url、用户名、密码....这些信息一旦被暴露那么整个数据库都将会被泄漏,那么如何将这些配置隐藏呢?今天介绍一种方案,让你在无感知的情况下实现配…

vector clone_Java Vector clone()方法与示例

vector clone向量类clone()方法 (Vector Class clone() method) clone() method is available in java.util package. clone()方法在java.util包中可用。 clone() method is used to copy or clone or return a shallow copy of this Vector. clone()方法用于复制,克…

js ‘use strict’详解

2019独角兽企业重金招聘Python工程师标准>>> 一、概述 除了正常运行模式,ECMAscript 5添加了第二种运行模式:"严格模式"(strict mode)。顾名思义,这种模式使得Javascript在更严格的条件下运行。 …

如何优雅的写 Controller 层代码?

本篇主要要介绍的就是controller层的处理,一个完整的后端请求由4部分组成:1. 接口地址(也就是URL地址)、2. 请求方式(一般就是get、set,当然还有put、delete)、3. 请求数据(request,有head跟body)、4. 响应数据(response)本篇将解…

java uuid静态方法_Java UUID version()方法与示例

java uuid静态方法UUID Class version()方法 (UUID Class version() method) version() method is available in java.util package. version()方法在java.util包中可用。 version() method is used to get the version number linked with this UUID. version()方法用于获取与…

黑马程序员——选择排序

排序算法有很多,记得当初一开始学C时就有这种问题。那个时候会用也最易理解的排序算法,就是选择排序了(当时并不知道这样的算法还有名字)。 思想 还是先来看看选择排序的思想。选择排序的思想非常直接,不是要排序么&am…

面试突击60:什么情况会导致 MySQL 索引失效?

作者 | 磊哥来源 | Java面试真题解析(ID:aimianshi666)转载请联系授权(微信ID:GG_Stone)为了验证 MySQL 中哪些情况下会导致索引失效,我们可以借助 explain 执行计划来分析索引失效的具体场景。…

treeset java_Java TreeSet last()方法与示例

treeset javaTreeSet类的last()方法 (TreeSet Class last() method) last() method is available in java.util package. last()方法在java.util包中可用。 last() method is used to return the largest element that exists in this TreeSet. last()方法用于返回此TreeSet中存…