How to randomly generate a subset of samples?
Hi,
I have a dataset and I want to generate a subset by randomly select 70% of the whole dataset. I know cv::RNG::fill(....) generates random integers in a range, but I guess the generated numbers will repeat.
Is there any function in opencv can provide such functionality?
Thank you.
Best, bear
are you using this for machinelearning ?
you could use the TrainData class, it has methods to split your dataset randomly
also: randShuffle()
Just for the record, these are pseudorandom numbers, not random numbers.