- Python Deep Learning
- Ivan Vasilev Daniel Slater Gianmario Spacagna Peter Roelants Valentino Zocca
- 344字
- 2021-07-02 14:31:01
Decision Trees
Another popular supervised algorithm is the decision tree. A decision tree creates a classifier in the form of a tree. This is composed of decision nodes, where tests on specific attributes are performed; and leaf nodes, which indicate the value of the target attribute. To classify a new sample, we start at the root of the tree and navigate down the nodes until we reach a leaf.
A classic application of this algorithm is the Iris flower dataset (http://archive.ics.uci.edu/ml/datasets/Iris), which contains data from 50 samples of three types of Irises (Iris Setosa, Iris Virginica, and Iris Versicolor). Ronald Fisher, who created the dataset, measured four different features of these flowers:
- The length of their sepals
- The width of their sepals
- The length of their petals
- The width of their petals
Based on the different combinations of these features, it's possible to create a decision tree to decide which species each flower belongs to. In the following diagram, we have defined a decision tree that will correctly classify almost all the flowers using only two of these features, the petal length and width:

To classify a new sample, we start at the root note of the tree (petal length). If the sample satisfies the condition, we go left to the leaf, representing the Iris Setosa class. If not, we go right to a new node (petal width). This process continues until we reach a leaf. There are different ways to build decision trees, and we will discuss them later, in the chapter.
In recent years, decision trees have seen two major improvements. The first is Random Forests, which is an ensemble method that combines the predictions of multiple trees. The second is Gradient-Boosting Machines, which creates multiple sequential decision trees, where each tree tries to improve the errors made by the previous tree. Thanks to these improvements, decision trees have become very popular when working with certain types of data. For example, they are one of the most popular algorithms used in Kaggle competitions.
- iOS Game Programming Cookbook
- 解構產品經理:互聯網產品策劃入門寶典
- 小程序實戰視頻課:微信小程序開發全案精講
- MySQL數據庫應用與管理 第2版
- C# 2012程序設計實踐教程 (清華電腦學堂)
- Learning ArcGIS Pro
- 零基礎學Python網絡爬蟲案例實戰全流程詳解(高級進階篇)
- Learning Raspbian
- Java EE 8 Application Development
- Android驅動開發權威指南
- 軟件項目管理實用教程
- Spring MVC+MyBatis開發從入門到項目實踐(超值版)
- ABAQUS6.14中文版有限元分析與實例詳解
- Mastering OAuth 2.0
- Mastering Unreal Engine 4.X