Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(caret)
- library(randomForest)
- model = randomForest(Species~.,data=iris, ntree=100, mtry=2)
- pred = predict(model, iris)
- confusionMatrix(pred, iris$Species)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement