Combine multiple datastores in for loop for Leave one out cross validation
3 ビュー (過去 30 日間)
古いコメントを表示
I have 30 imagedatastores stored in a cell arrays bigImgDS{30,1}.
Now I want select one datastore in cell array as test and combine all other as train in one iteration of loop. But it doesnt allow me to do that
N = numel(bigImgDS)
for i =1:N
test = Big_ImgDs{i,1};
train = Big_ImgDs{[1:end ~=i],1}
end
0 件のコメント
回答 (1 件)
Anmol Dhiman
2020 年 12 月 10 日
Hi Mudit,
Use the following code for looping in the cell array
for i =1:N
test = Big_ImgDs{i};
train = Big_ImgDs;
train(i)=[];
end
Regards,
Anmol Dhiman
3 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!