September 2017
Beginner to intermediate
304 pages
7h 2m
English
github.com/sjwhitworth/golearn also implements random forests. To utilize random forest in solving the iris problem, we simply swap our decision tree model for the random forests. We will need to tell the package how many trees we want to build and with how many randomly chosen features per tree.
A sane default for the number of features per tree is the square root of the number of total features, which in our case would be two. We will see that this choice for our small dataset does not produce good results because we need all of the features to make a good prediction here. However, we will illustrate random forest with the sane default to see how it works:
// Assemble a random forest with 10 trees and 2 features per ...
Read now
Unlock full access