seniorDecision Trees
What is the computational complexity of training a Decision Tree?
Updated May 16, 2026
Short answer
Training a Decision Tree typically takes O(n log n * d) time depending on dataset size and feature count.
Deep explanation
At each node, the algorithm evaluates splits across all features and possible thresholds. Sorting features dominates cost, leading to O(n log n) per feature in naive implementations. Optimizations reduce this using presorted values or histograms. Depth of the tree adds additional multiplicative cost.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro