I have a really large dataset and i'm trying to build a classification model using R. However I need to use a train, test and validation set. But i'm a bit confused about the way to perform this. For example, I built a tree using a train set and then i computed the predicion using a test set. But I believe that i should be using the train and the test set to best tune the tree and after that use the validation set to validate. How can i do this?
library(rpart)
part.installed <- rpart(TARGET ~ RS_DESC+SAP_STATUS +
ACTIVATION_STATUS+ROTUL_STATUS+SIM_STATUS+RATE_PLAN_SEGMENT_NORM,
trainSet, method="class")
part.predictions <- predict(part.installed, testSet, type="class")
(P.S the tree is only an example. It could be another classification algorithm)
Usually the terminology is as follows:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With