How to partition a data set.
6 ビュー (過去 30 日間)
古いコメントを表示
How can I partition a data set into a specified number of partition. I need to divide my data as 6 partition. I used
subds = partition(ds,n,index). How can I do that?
Please help me.
0 件のコメント
回答 (1 件)
Raunak Gupta
2020 年 3 月 19 日
Hi,
I assume you have dataset in some file format that can be read by any of the datastore mentioned here. The partition function will return a partition of that datastore with is indexed by variable idx. For example, the datastore has 36 files and you want to partition it into 6 datastore, so each partition will have 6 files. Each partition can be called with the help of index. Below example can clarify further.
% Let's say ds is the datastore with 36 files
subds1 = partition(ds,6,1); % contains files 1-6
subds2 = partition(ds,6,2); % contains files 7-12
subds3 = partition(ds,6,3); % contains files 13-18
subds4 = partition(ds,6,4); % contains files 19-24
subds5 = partition(ds,6,5); % contains files 25-30
subds6 = partition(ds,6,6); % contains files 31-36
Hope it helps!
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Datastore についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!