- Isolate each of the classes, using something like "Y == A" (this is pseudocode, not MATLAB syntax), etc
- Randomly assign each class to your groups (training and testing, whatever)
- Combine the classes into the groups
How to Split data into 3 equal parts (A,B,C) with balanced numbers of each subclass.
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a dataset and I can split it into 3 parts but I do not know how to make sure that these 3 parts are with balanced numbers of each subclass.
0 个评论
回答(1 个)
the cyclist
2021-3-6
Probably the easiest way to do this would be with the following steps:
If you upload the data -- or at the very least describe in detail what your data look like -- I could probably give more specific advice with actual code.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!