September 2019
Intermediate to advanced
420 pages
10h 29m
English
Although we have so far focused on using decision trees in classification tasks, you can also use them for regression. But you will need to use scikit-learn again, as OpenCV does not provide this flexibility. We will therefore only briefly review its functionality here:
In [1]: import numpy as np... rng = np.random.RandomState(42)
In [2]: X = np.sort(5 * rng.rand(100, 1), axis=0)... y = np.sin(X).ravel()
Read now
Unlock full access