I have this modified iris data-set which comprises of first 100 rows i.e only the 'setosa' and 'versicolor' species. I have randomized the rows using sample() function:
The i've divided the data-set in 65:35 ratio using the sample.split function from caTools package:
sample.split(iris1$Species,SplitRatio = 0.65)->mysplit
Following which i've built the rpart model on top of "train" set and predicted the values on "test" set:
predict(mod1,test,type = "class")->result1
Now, i would want to find the accuracy of prediction on the test set, how can i do that?