how to split the dataset into four different variables
2 次查看(过去 30 天)
显示 更早的评论
As we can see from the below code we have divided the data into four varaibles.now my question is how to divide the data into four variables having first dimension same like idxTrain and traindata should have first dimension same and idxtest and test data should have first dimension same.
Thank you.
cv = cvpartition(2310, 'KFold', 10);
idxTrain = training(cv, 1);
idxTest = test(cv, 1);
traindata = data(idxTrain, :);
testdata = data(idxTest, :);
1 个评论
dpb
2022-6-2
I don't understand the questioni??? Please explain precisely what you mean/want. Reason behind the question might help to add some context.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!