How to divide a data set into training and testing data set in MATLAB using cross-validation?
0
0
Entering edit mode
6.0 years ago
Chaimaa ▴ 260

Hello guys, how could I divide a clinical dataset into training and testing datasets using cross-validation?

dataset cross-validation • 2.9k views
ADD COMMENT
1
Entering edit mode

Have you looked this ?

Apart from that, do you have to use just MATLAB, you can find more help or documentation if you use python or R.

ADD REPLY
0
Entering edit mode

@arta yes, I already checked that link but didn't get what i want. My data is a matrix of 359 rows and 5 columns but when i applied that code on the link you proposed i got 2 datasets but with only one column on each.However, my goal is to find 2 subsets of training and testing sets with random rows but 5 columns I'm more familiar with MATLAB.

My inputs were a matrix of 359*5

My expected outputs

  • training set: k*5
  • Testing set; l*5
ADD REPLY
0
Entering edit mode

Well, technically it should work. Quick and dirty solution can be transposing the data before applying the function or you can check this link that i have found.

ADD REPLY

Login before adding your answer.

Traffic: 2433 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6