Why it is 94? corss-validation for regression tree problem.

1 次查看(过去 30 天)
Hi,
Example shown on the page below.
load carsmall
X = [Acceleration Displacement Horsepower Weight]; % X is 100 by 4.
Mdl = fitrtree(X,MPG); % grow a regression tree using the entire data set.
CVMdl = crossval(Mdl); % cross-validate the regression tree using 10-fold cross-validation
As I looked into CVMdl (the RegressionPartitionedModel cross-validated model), it shows the observation number used in each fold is 94. Why is it 94 not 90? See screenshot below.
Untitled.png
Since X is 100 by 4, showing there are 100 observations to start. To have 10 folds, it means they should divide X into 90 training data and 10 test data. So I couldn't figure out why it is 94 training data instead of 90.
Please help.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Gaussian Process Regression 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by