I felt a little bit puzzled about cross-validation. CV is a method to find the best parameter to check the generalization ability of the classifier in the classification problem.
- I am really not sure whether I should apply cross-validation on the training set or on the entire dataset? I prefer on the training set because if you apply it to the entire set, it will lead to overfitting again.
- Next question is: what is the correct step to use cross-validation in the classification problem. My view is (1)separate the data set as training set and testing set;(2)apply CV to the training set to get the best parameter; (3)use the best parameter to train a model;(4)use this model to test the testing set.
Am I correct?