ML
    beginner

    Decision Tree

    algorithms.live

    Decision Tree Visualizer
    Depth: 2

    Tree Parameters

    2
    SimpleComplex

    Controls

    Tree Info

    Nodes:3
    Splits:1
    Training Samples:16
    Root gini:0.500

    Decision Space

    Feature XFeature Y

    Tree Structure

    y ≤ 4.8samples: 16gini: 0.500Class 0samples: 8gini: 0.000Class 1samples: 8gini: 0.000

    Gini Impurity

    Gini = 1 - Σ(p²)

    Measures how often a randomly chosen element would be incorrectly labeled. Range: [0, 0.5]

    Entropy

    H = -Σ(p × log₂(p))

    Measures disorder/randomness. From information theory. Range: [0, 1]

    Information Gain

    IG = Impurity(parent) - Weighted(children)

    How much uncertainty is reduced by the split. Algorithm maximizes this!

    Supervised Learning
    Classification
    Interpretable
    Ensemble Foundation
    sklearn

    Grow one node

    Sequence

    Order how a tree chooses a split.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    5 pieces left to place

    Test your knowledge

    20 questions
    Question 1 of 20
    Score: 0

    A decision tree makes predictions by…

    Interview Questions

    Microsoft
    Amazon
    Databricks
    Zillow
    Redfin
    Opendoor
    Google
    LinkedIn
    Databricks
    Salesforce
    IBM
    Capital One
    Meta
    Airbnb
    Two Sigma

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required