[Matlab] - Stratified Sampling of Multidimentional Data


New Member
I want to divide a corpus into training & testing sets in a stratified fashion.

The observation data points are arranged in a Matrix A as


Each column of the matrix represent a distinct feature.

In Matlab, the cvpartition(A,'holdout',p) function requires A to be a vector. How can I perform the same action with A as a Matrix i.e. resulting sets have roughly the same distribution of each feature as in the original corpus.