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

1 view (last 30 days)
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.

Answers (0)

Community Treasure Hunt

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

Start Hunting!