sion boundary obtained by averaging their predicted probabilities as another examplelet' apply random forest consisting of trees on the breast cancer datasetin[ ]x_trainx_testy_trainy_test train_test_splitcancer datacancer targetrandom_state= forest randomforestclassifier(n_estimators= random_state= forest fit(x_trainy_trainprint("accuracy on training set{ }format(forest score(x_trainy_train))print("accuracy on test set{ }format(forest score(x_testy_test))out[ ]accuracy on training set accuracy on test set the random forest gives us an accuracy of %better than the linear models or single decision treewithout tuning any parameters we could adjust the max_fea tures settingor apply pre-pruning as we did for the single decision tree howeveroften the default parameters of the random forest already work quite well similarly to the decision treethe random forest provides feature importanceswhich are computed by aggregating the feature importances over the trees in the forest typicallythe feature importances provided by the random forest are more reliable than the ones provided by single tree take look at figure - supervised learning