Main Content

shuffle

데이터저장소의 모든 데이터 읽기 섞기

설명

예제

dsrand = shuffle(ds)ds의 데이터를 임의의 순서로 포함하는 datastore 객체를 반환합니다.

예제

모두 축소

ImageDatastore 객체 imds를 생성합니다. 파일을 섞어서 임의의 순서로 같은 파일들을 포함하는 새 데이터저장소를 생성합니다.

imds = imageDatastore(fullfile(matlabroot, 'toolbox', 'matlab', {'demos','imagesci'}),'LabelSource','foldernames','FileExtensions', {'.jpg', '.png', '.tif'})
imds = 

  ImageDatastore with properties:

      Files: {
             ' ...\matlab\toolbox\matlab\demos\cloudCombined.jpg';
             ' ...\matlab\toolbox\matlab\demos\example.tif';
             ' ...\matlab\toolbox\matlab\demos\landOcean.jpg'
              ... and 5 more
             }
     Labels: [demos; demos; demos ... and 5 more categorical]
    ReadFcn: @readDatastoreImage

imdsrand = shuffle(imds)
imdsrand = 

  ImageDatastore with properties:

      Files: {
             ' ...\matlab\toolbox\matlab\demos\street2.jpg';
             ' ...\matlab\toolbox\matlab\demos\landOcean.jpg';
             ' ...\matlab\toolbox\matlab\imagesci\corn.tif'
              ... and 5 more
             }
     Labels: [demos; demos; imagesci ... and 5 more categorical]
    ReadFcn: @readDatastoreImage

입력 인수

모두 축소

입력 데이터저장소로, datastore 객체로 지정됩니다. 입력 데이터저장소는 isShuffleabletrue를 반환하는 모든 데이터저장소(예: imageDatastore)일 수 있습니다. 입력 데이터저장소는 모든 기본 데이터저장소의 섞기가 가능한 CombinedDatastore, SequentialDatastore 또는 TransformedDatastore일 수도 있습니다.

출력 인수

모두 축소

출력 데이터저장소로, ds의 데이터를 임의의 순서로 포함하는 datastore 객체로 반환됩니다.

확장 기능

버전 내역

R2016a에 개발됨