Skip to Content
Python数据科学手册
book

Python数据科学手册

by Jake VanderPlas
January 2018
Intermediate to advanced
470 pages
13h 23m
Chinese
Posts & Telecom Press
Content preview from Python数据科学手册
机器学习
|
367
•
预测结果不能直接进行概率解释。这一点可以通过内部交叉检验进行评估(具体请参见
SVC 的 probability 参数的定义),但是评估过程的计算量也很大。
由于这些限制条件的存在,我通常只会在其他简单、快速、调优难度小的方法不能满足需
求时,才会选择支持向量机。但是,如果你的计算资源足以支撑
SVM
对数据集的训练和
交叉检验,那么用它一定能获得极好的效果。
5.8
 专题
:
决策树与随机森林
前文详细介绍了一个简单的分类器(朴素贝叶斯分类器,详情请参见
5.5
节),以及一个强
大的判别分类器(支持向量机,详情请参见
5.7
节)。下面将介绍另一种强大的算法——无
参数算法
随机森林
。随机森林是一种
集成
方法,通过集成多个比较简单的评估器形成累积
效果。这种集成方法的学习效果经常出人意料,往往能超过各个组成部分的总和;也就是
说,若干评估器的多数投票(
majority vote
)的最终效果往往优于单个评估器投票的效果!
后面将通过示例来演示,首先还是导入标准的程序库:
In[1]: %matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
5.8.1
 随机森林的诱因
:
决策树
随机森林是建立在决策树基础上的
集成学习器
。因此,首先来介绍一下决策树。
决策树采用非常直观的方式对事物进行分类或打标签:你只需问一系列问题就可以进行分
类了。例如,如果你想建一棵决策树来判断旅行时遇到的一只动物的种类 ...
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

Luciano Ramalho
Python数据分析基础

Python数据分析基础

Clinton W. Brownley
Python数据处理

Python数据处理

Jacqueline Kazil, Katharine Jarmul

Publisher Resources

ISBN: 9787115475893