September 2019
Intermediate to advanced
420 pages
10h 29m
English
OpenCV's implementation of decision trees is good enough if you are just starting out and don't care too much about what's going on under the hood. However, in the following sections, we will switch to scikit-learn. Its implementation allows us to customize the algorithm and makes it a lot easier to investigate the inner workings of the tree. Its usage is also much better documented.
In scikit-learn, decision trees can be used for both classification and regression. They reside in the tree module:
In [21]: from sklearn import tree
In [22]: dtc = tree.DecisionTreeClassifier() ...
Read now
Unlock full access