Build a Decision Tree from scratch using Python (numpy)
Vložit
- čas přidán 2. 08. 2024
- In this video we will build a decision tree for classification, using only numpy and built in python.
Trees Playlist: bit.ly/MeerkatStatisticsTrees
Become a member and get full access to this online course:
meerkatstatistics.com/courses...
** 🎉 Special CZcams 60% Discount on Yearly Plan - valid for the 1st 100 subscribers; Voucher code: First100 🎉 **
"Decision Trees" Mini Course Outline:
* Course Materials
* Introduction to Decision Trees
* Split Criteria
* Stop Criteria, Categorical Data, Missing Values and Implementation Details
* Build a Decision Tree from scratch in Python using numpy
* Code - Moving to a class implementation, entropy
* Code - Building the tree using a stack and a queue
* Code - Regression Trees
* Cost Complexity Pruning - Theory and Code
If you’re looking for statistical consultation, work on interesting projects, or training workshop, visit my website meerkatstatistics.com/ or contact me directly at david@meerkatstatistics.com
~~~~~ SUPPORT ~~~~~
Paypal me: paypal.me/MeerkatStatistics
~~~~~~~~~~~~~~~~~
In the find_best_split function, the line "if np.any(left_indices) and np.any(right_indices)" is pretty redundant. It will save checking an empty split (= no split) for the last threshold, and might avoid some problems if the metric_func implementation can't handle an empty set.