May 2020
Intermediate to advanced
530 pages
17h 8m
English
Another ensemble learning algorithm implemented in the Shogun library is the random forest algorithm. We'll use it for the same function approximation task. It is implemented in the CRandomForest class. To instantiate an object of this class, we have to pass two parameters to the constructor: one is the number of trees (also, it equals the number of bags the dataset should be divided to); the second is the number of attributes chosen randomly during the node splitting when the algorithm builds a tree.
The next important configuration option is the rule on how the tree results should be combined into the one final answer. The set_combination_rule method is used to configure it. In the following example, we used ...
Read now
Unlock full access