shuffle
データストア内のすべてのデータをシャッフルする
説明
例
ImageDatastore オブジェクト imds を作成します。ファイルをシャッフルして、同じファイルをランダムな順序で含む新しいデータストアを作成します。
imds = imageDatastore(["cloudCombined.png","example.tif","landOcean.jpg","street2.jpg","corn.tif"]); imdsrand = shuffle(imds)
imdsrand =
ImageDatastore with properties:
Files: {
'C:\folder1\landOcean.jpg';
'C:\folder1\cloudCombined.png';
'C:\folder1\corn.tif'
... and 2 more
}
Folders: {
'C:\folder1'
}
AlternateFileSystemRoots: {}
ReadSize: 1
Labels: {}
SupportedOutputFormats: ["png" "jpg" "jpeg" "tif" "tiff"]
DefaultOutputFormat: "png"
ReadFcn: @readDatastoreImage
入力引数
入力データストア。datastore オブジェクトとして指定します。入力データストアには、isShuffleable が true を返す任意のデータストア (imageDatastore など) を指定できます。また、入力データストアには、基となるすべてのデータストアがシャッフル可能な CombinedDatastore、SequentialDatastore、または TransformedDatastore も指定できます。
出力引数
出力データストア。ds のデータをランダムな順序で含む datastore オブジェクトとして返されます。
拡張機能
shuffle 関数はスレッドベースの環境をサポートしますが、次の使用上の注意および制限があります。
スレッドベースの環境では、次のデータストアでのみ
shuffleを使用できます。ImageDatastoreオブジェクトcombineまたはtransformを使用してImageDatastoreオブジェクトから作成するCombinedDatastore、SequentialDatastore、またはTransformedDatastoreオブジェクト
Parallel Computing Toolbox™ がある場合は、他のデータストアで
shuffleを使用できます。これを行うには、backgroundPoolまたはThreadPoolを使用する代わりに、プロセスベースの並列プールを使用して関数を実行します (ProcessPoolまたはClusterPoolを使用します)。
詳細については、スレッドベースの環境での MATLAB 関数の実行を参照してください。
バージョン履歴
R2016a で導入
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)