Here's a code snippet that shuffles a dataset in Matlab for machine learning training:
main.m176 chars10 lines
Explanation:
randperm(n)
generates a vector of random integers from 1 to n in a random orderdataset(idx)
rearranges the dataset according to the shuffled indexesYou can modify this code to fit your own dataset and save it to a new variable for subsequent machine learning training purposes.
gistlibby LogSnag