How to randomly select matrices from within a cell array for neural network training?

Hi!
My problem is, I want to create a training, test and validation set for neural network training from a cell array that contains matrices with different number of rows (denoting samples), but of course the same number of columns(denoting variables).
One issue is, the train function does not accept an input cell array with matrices having different number of rows or columns.
Another issue is, If I use the function 'patternnet' for creating a network and set net.divideFcn = 'dividerand', it chooses samples randomly, I suppose. But I want the matrices in the cell, instead of rows from all matrices within the cell, to be chosen randomly. How do I go about it?
I'm not sure, but is cvpartition an option? I'm not sure if the partition model can be used with NNs
Thanks.

 채택된 답변

Greg Heath
Greg Heath 2014년 12월 17일
Convert cells to an I x N input matrix with N I-dimensional input vectors and an O x N output matrix with N corresponding O-dimensional target vectors.
Use divideind to divide into trn/val/tst subsets.
Hope this helps.
Thank you for formally accepting my answer
Greg

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

질문:

2014년 12월 16일

댓글:

2014년 12월 17일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by