indices to column vectros of a matrix using “crossvalind”
Afficher commentaires plus anciens
i got a 3x50 matrix. i would like to obtain the 50 3x1 column vectors and assign to them indices using the crossvalind command seen above
Indices = crossvalind('Kfold',N, 10);
so lets hypotheticaly say that i had a 3x3 matrix named "input" :
input=[1 2 3;4 5 6;7 8 9]
how can I imply an index generation for the vector columns of my "input" matrix using crossvalind?
A=[1;4;7]
B=[2;5;9]
C=[3;6;9]
**the reason i wanna do it is so i can after apply cross validation while having as train/test set these column vectors
Réponses (3)
Azzi Abdelmalek
le 7 Juin 2013
A=input(:,1)
3 commentaires
Azzi Abdelmalek
le 7 Juin 2013
laplace laplace commented
thanx for answering but i got a feeling that you missunderstood my question :))
Azzi Abdelmalek
le 7 Juin 2013
What are your feeling about this?
A=[1;4;7]
Indices = arrayfun(@(x) crossvalind('Kfold',x, 10),A,'un',0);
laplace laplace
le 10 Juin 2013
laplace laplace
le 10 Juin 2013
Modifié(e) : laplace laplace
le 10 Juin 2013
laplace laplace
le 16 Juin 2013
0 votes
Catégories
En savoir plus sur MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!