Skip to Content
数据科学中的实用统计学(第2版)
book

数据科学中的实用统计学(第2版)

by Peter Bruce, Andrew Bruce, Peter Gedeck
October 2021
Intermediate to advanced
289 pages
8h 31m
Chinese
Posts & Telecom Press
Content preview from 数据科学中的实用统计学(第2版)
回归与预测
153
本节关键术语
多项式回归
向回归中添加多项式项(二次项、三次项,等等)。
样条回归
使用多个多项式片段拟合出一条平滑曲线。
节点
分隔样条片段的值。
广义可加模型
能自动选择节点的样条模型。
同义词
GAM
非线性回归
统计学家所说的
非线性回归
是指那些不能使用最小二乘法进行拟合的模型。
什么样的模型是非线性的呢?基本上就是所有响应变量不能表示成预测变量
(或预测变量的某种转换形式)的线性组合的模型。非线性回归模型的拟合
更加困难,也需要更为密集的计算成本,因为它们需要在数值上进行优化。
因此,如果可能,通常还是要选择使用线性模型。
4.7.1
 多项式回归
多项式回归
在回归方程中加入多项式项。多项式回归的使用几乎可以回溯到
1815
Gergonne
一篇论文中提出了回归方法。举例来说,预测变量
X
和响应变量
Y
之间的二次
回归可以表示如下:
Y
=
b
0
+
b
1
X
+
b
2
X
2
+
e
R
,可以使用
poly
函数拟合多项式回归。例如,以下代码可以为金县房屋数据拟合
一个带有
SqFtTotLiving
二次项的多项式回归:
lm(AdjSalePrice ~ poly(SqFtTotLiving, 2) + SqFtLot +
BldgGrade + Bathrooms + Bedrooms,
data=house_98105)
Call:
lm(formula = AdjSalePrice ~ poly(SqFtTotLiving, 2) + SqFtLot +
BldgGrade + Bathrooms ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu

Publisher Resources

ISBN: 9787115569028