Top Python Libraries

Top Python Libraries

Share this post

Top Python Libraries
Top Python Libraries
Decision Tree (Part 1): Should You Play Basketball? Let the Decision Tree Tell You!(Practical Data Analysis 11)
Copy link
Facebook
Email
Notes
More

Decision Tree (Part 1): Should You Play Basketball? Let the Decision Tree Tell You!(Practical Data Analysis 11)

Learn how decision trees use weather, temperature, and wind data to make decisions like playing basketball. Explore ID3 and C4.5 algorithms with practical examples!

Meng Li's avatar
Meng Li
Dec 15, 2024
∙ Paid

Share this post

Top Python Libraries
Top Python Libraries
Decision Tree (Part 1): Should You Play Basketball? Let the Decision Tree Tell You!(Practical Data Analysis 11)
Copy link
Facebook
Email
Notes
More
1
Share

Welcome to the "Practical Data Analysis" Series

Table of Contents

Table of Contents

Meng Li
·
July 12, 2024
Read full story

Imagine a scene where a girl's mother introduces her boyfriend to her:

Daughter: Is he handsome?

Mother: He's quite handsome.

Daughter: Does he own a house?

Mother: He has one back home.

Daughter: Does he earn a lot?

Mother: He's doing well, his annual salary is in the millions.

Daughter: What does he do?

Mother: He's in IT, and works in data mining for an internet company.

Daughter: Sounds good, I’ll meet him.

In real life, we face various decisions, whether it’s choosing a boyfriend or picking fruits. We tend to make judgments based on our past experiences.

If we map out the logic behind these judgments as a diagram, we’ll find it’s essentially a tree structure. This is what we’re going to talk about today: decision trees.

How Decision Trees Work

A decision tree essentially summarizes our past experiences.

Let me give you an example of a dataset for playing basketball. If we want to go play basketball, we generally make decisions based on "weather," "temperature," "humidity," and "wind," ultimately leading to the question: Should we play basketball or not?

The diagram above is a typical decision tree. When creating a decision tree, we go through two main stages: construction and pruning.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Meng Li
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More