我已经开始使用10倍交叉验证为高维数据集创建一些训练和测试集:
Dataset[] folds = data.folds((10), new Random(100));
Dataset training = new DefaultDataset();
Dataset testing = new DefaultDataset();
int[] tr = {0,2,3,4,5,6,7,8,9};
int[] te = {1};
for (int i = 0; i < tr.length; i++) {
training.addAll(folds[tr[i]]);
}
for (int i = 0; i < te.length; i++) {
testing.addAll(folds[te[i]]);
}
如果错了,有人可以纠正我吗?
干杯