Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201977

How to perform bagging of decision trees and get the accuracy using out-of-bag estimation?

$
0
0

I am trying to perform bagging of decision trees using a number of bag sizes 200, 400, 600 to get the accuracy of each bag size using oob estimation. How would I update my code to use multiple bag sizes and from this how would I get the accuracy using oob estimation for each bag size? Here is my code so far...

library(ipred)
data(iris)
training_set.tree <- bagging(as.factor(Species)~., iris, nbagg=200, coob=TRUE)

Viewing all articles
Browse latest Browse all 201977

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>