4.2 The Regression Equation

Because we could draw many different lines through the cluster of data points, we need a method to choose the “best” line. The method, called the least-squares criterion, is based on an analysis of the errors made in using a line to fifit the data points.

存在有限个可能的的模型(可以使用之后的方法得到模型),从中取出最有可能的2个:并用最小二乘法计算error:

比如(a)中的e

最后得到:

计算,最后确定模型为b,这只是对模型的评价,生成模型可以使用以下方法:

推导:

Suppose that a scatterplot indicates a linear relationship between two variables. Then,within the range of the observed values of the predictor variable, we can reasonably use the regression equation to make predictions for the response variable. However,to do so outside that range, which is called extrapolation,

比如减价趋势下的产品价格,离开观测值范围后,价格可能会处于负值状态,所以线性关系必须注明自变量range

In the context of regression, an outlier is a data point that lies far from the regression line

Outliers and Influential Observations

Outliers是偏离直线太远的值

influential observation : a data point whose removal causes the regression equation (and line) to change considerably

Eg.在加入(2,169)前后的直线发生了巨大变化,所以(2,169)是一个influential observation

解决办法:

1.缩小x的range

2.添加influential observation 周围的点

Nonetheless, we may need either to remove it—thus limiting the analysis to Orions between 4 and 7 years old—or to obtain additional data on 2- and 3-year-old Orions so that the regression analysis is not so dependent on one data point

outlier和influential observation实际上很难分清:An outlier may or may not be an inflfluential observation, and an inflfluential observation may or may not be an outlier. Many statistical software packages identify potential outliers and inflfluential observations.

否则会出现:

该分布实际上应该为curvilinear regression

多重线性回归:

曲线回归:

the least-squares criterion|Sxx|Sxy|Syy|Regression Equation|Outliers|Influential Observations|curvilinear regression|linear regression的更多相关文章

  1. Regularized Linear Regression with scikit-learn

    Regularized Linear Regression with scikit-learn Earlier we covered Ordinary Least Squares regression ...

  2. [UFLDL] Linear Regression & Classification

    博客内容取材于:http://www.cnblogs.com/tornadomeet/archive/2012/06/24/2560261.html Deep learning:六(regulariz ...

  3. CheeseZH: Stanford University: Machine Learning Ex5:Regularized Linear Regression and Bias v.s. Variance

    源码:https://github.com/cheesezhe/Coursera-Machine-Learning-Exercise/tree/master/ex5 Introduction: In ...

  4. 机器学习 (一) 单变量线性回归 Linear Regression with One Variable

    文章内容均来自斯坦福大学的Andrew Ng教授讲解的Machine Learning课程,本文是针对该课程的个人学习笔记,如有疏漏,请以原课程所讲述内容为准.感谢博主Rachel Zhang的个人笔 ...

  5. 机器学习 (二) 多变量线性回归 Linear Regression with Multiple Variables

    文章内容均来自斯坦福大学的Andrew Ng教授讲解的Machine Learning课程,本文是针对该课程的个人学习笔记,如有疏漏,请以原课程所讲述内容为准.感谢博主Rachel Zhang 的个人 ...

  6. Linear regression with one variable - Model representation

    摘要: 本文是吴恩达 (Andrew Ng)老师<机器学习>课程,第二章<单变量线性回归>中第6课时<模型概述>的视频原文字幕.为本人在视频学习过程中逐字逐句记录下 ...

  7. 机器学习---最小二乘线性回归模型的5个基本假设(Machine Learning Least Squares Linear Regression Assumptions)

    在之前的文章<机器学习---线性回归(Machine Learning Linear Regression)>中说到,使用最小二乘回归模型需要满足一些假设条件.但是这些假设条件却往往是人们 ...

  8. 机器学习---用python实现最小二乘线性回归算法并用随机梯度下降法求解 (Machine Learning Least Squares Linear Regression Application SGD)

    在<机器学习---线性回归(Machine Learning Linear Regression)>一文中,我们主要介绍了最小二乘线性回归算法以及简单地介绍了梯度下降法.现在,让我们来实践 ...

  9. 机器学习笔记1——Linear Regression with One Variable

    Linear Regression with One Variable Model Representation Recall that in *regression problems*, we ar ...

随机推荐

  1. VS2013 MFC opencv 播放视频

    看网上有很多人用的还是CvvImage类,但是Opencv3.0已经没有CvvImage这个类了.百度得之可以使用以前的类,稍作修改就可以了. 头文件: #pragma once #ifndef CV ...

  2. MFC下的网络编程(1)CAsyncSocket进行无连接(UDP)通信

    服务器端发送数据给客户端 先看服务器端: CAsyncSocket m_sockSend;                       //声明一个Socket对象 点击发送数据后,执行下面这些动作 ...

  3. kaggle——TMDB 电影票房收入预测

    介绍 看电影是目前人们休闲娱乐,消遣时光的选择之一.我们都知道,有些电影的票房很高,有的电影票房却很低,那么决定票房的因素是什么呢?本次将介绍,如何根据电影上映前的一些信息来预测出该电影的票房. 知识 ...

  4. mysql分组和排序操作

    分组.排序操作                                                                                         sele ...

  5. [CISCN2019 华北赛区 Day2 Web1]Hack World

    知识点:题目已经告知列名和表明为flag,接下来利用ascii和substr函数即可进行bool盲注 eg: id=(ascii(substr((select(flag)from(flag)),1,1 ...

  6. Dynamics CRM - 在 C# Plugin 里以 System Administrator 权限来更新 Entity

    场景说明: 1.在使用 CRM 系统时,经常会有需要在某个 Entity 下对其他 Entity 的 Record 进行更新,或者在 post 中对自身进行更新,这里就需要用到 SDK 上的 upda ...

  7. format 可以用 * 星号

    procedure TForm1.FormCreate(Sender: TObject); var s:string; a:integer; b:Single; begin a:=; b:=108.4 ...

  8. 吴裕雄--天生自然 JAVA开发学习:switch case 语句

    public class Test { public static void main(String args[]){ //char grade = args[0].charAt(0); char g ...

  9. python编程:从入门到实践----第六章:字典>练习

    6-1 人:使用一个字典来存储一个熟人的信息,包括名.姓.年龄和居住的城市.该字典应包含键first_name .last_name .age 和city .将存储在该字典中的每项信息都打印出来. f ...

  10. 爬虫—GEETEST滑动验证码识别

    一.准备工作 本次使用Selenium,浏览器为Chrome,并配置好ChromDriver 二.分析 1.模拟点击验证按钮:可以直接使用Selenium完成.    2.识别滑块的缺口位置:先观察图 ...