How do i use divideblock to split my Datasets (5,749 images) in 80-20 split to obtain training and test datasets only?
    5 ビュー (過去 30 日間)
  
       古いコメントを表示
    
How do i use divideblock to split my Datasets (5,749 images) in 80-20 split to obtain training and test datasets only. Upon running my code below, number of images in trainingA = (1*4001) and testA = (1*999 double) which is less than 5,749
Code: [trainA, testA] = divideblock(5749, 0.8, 0.2);
I will appreciate suggestions of other options.
0 件のコメント
採用された回答
  KSSV
      
      
 2018 年 3 月 16 日
        N = 5749;  % number of images 
idx = 1:N ;
PD = 0.80 ;
train_idx = idx(1:round(PD*N) ;     % training indices 
test_idx = idx(round(PD*N):end,:) ; % test indices
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

