Using an external validation set in classification learner

Hello,
The usual way to validate your model in the classification learner is to use one of the two options i.e. k-fold cross validation or hold out validation.
However I would like to use my own validation set I have prepared. Can you tell me how to do that in the classification learner?
Thanks a lot for your help.
Regards,
Ludovic.

 Respuesta aceptada

Drew
Drew el 27 de Mzo. de 2026 a las 21:46
Editada: Drew el 10 de Abr. de 2026 a las 15:38
First, using your own validation set information, create a "CustomPartition" cvpartition object based on the instructions at https://www.mathworks.com/help/stats/cvpartition.html
Second, starting in R2026a, the cvpartition object that you created can be imported into Classification Learner using the "ValidationPartition" Name-Value pair when starting the Classification Learner app from the command line. See https://www.mathworks.com/help/releases/R2026a/stats/classificationlearner-app.html for more details.

Más respuestas (0)

Preguntada:

el 25 de Jun. de 2019

Editada:

el 10 de Abr. de 2026 a las 15:38

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by