I have a dataset. I want to do cross validation. How can I divide it into testing and training data ?
1 view (last 30 days)
Show older comments
Hi, I have got 100 folders of which 50 are male and 50 are female. Each folder contains 6 images. I want to implement cross validation. I just know how to implement the cross validation if I just have the 100 distinct images. But here I have 100 different folders how to divide them for cross validation ? Need help.
0 Comments
Answers (1)
dpb
on 22 Aug 2016
Just randomize over the overall list...
2 Comments
dpb
on 22 Aug 2016
Return the list of subdirectories first in an array then select randomly from that array....there are quite a number of threads with code on Answers that show how to traverse a subdirectory if that's an issue...
See Also
Categories
Find more on Get Started with Statistics and Machine Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!