How to specify the number of Validation data in the Classification Learner?

2 views (last 30 days)
Hi everyone.
I have a dataset with 1000 samples and I want to have 750 samples for training, 150 samples for validation and 100 samples for testing. How can I set up 150 samples for validation data with Classification Learner app? please guide me.

Accepted Answer

Image Analyst
Image Analyst on 12 Oct 2021
First, put only 900 samples into your predictor table (not all 1000). Maybe use randsample(). So you'll have a tPredictor table with 900 rows, and a tTest table with 100 rows. Now you have 900 observations for training and you want 750 of those for training the model and, 150 of them for validation.On the Start New Session window, Select the "Holdout Validation" radio button and pick 150/900 which is 16 or 17%. I presume you know what to do after that.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!