0
$\begingroup$

I am making a machine learning model with supervised classification. I want to input my data, cross validate my model and then test it on a test set. Finally, I will use this to transform/make predictions for another dataset.

When it comes to creating the model I've been using cross validation on the training set (I have another set to test with once the cross validation is over), but I wasn't using it to test different models (I only input one model, decision tree classifier) or fine tune any paramaters. I am using random stratified 5 fold cross validation on the training set to get a confusion matrix/contingency table for each fold which I then average. Is this acceptable use of cross validation, or should I try fine tuning hyperparameters? Thanks

$\endgroup$
4
  • $\begingroup$ This seems ok to me - while cross validation is often used for model selection or hyperparameter tuning, it can be used where ever you need a test set. But depending on how you use your cross-validation and test set results, you may not need to do both. $\endgroup$
    – Lynn
    Commented Aug 12, 2022 at 12:19
  • $\begingroup$ So in this situation, where I am not tuning hyperparameters or selecting a model, is it more apropriate to just use the full data set and then average the contingency matrices as way to show the accuracy for my model? It seems this may be one of the cases where doing both is redundant as my results for both cross validation and test set are used for he same thing $\endgroup$
    – Zac Khan
    Commented Aug 12, 2022 at 12:58
  • $\begingroup$ Either method can be used. There are a few questions and answers on Cross Validated about using cross validation - Cdeterman's answer to Cross validation with test data set for example, may be helpful. $\endgroup$
    – Lynn
    Commented Aug 14, 2022 at 5:56
  • $\begingroup$ Great, thanks for your help @Lynn $\endgroup$
    – Zac Khan
    Commented Aug 18, 2022 at 10:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.