# Is it possible to change test and train data size when using crossvalind function with Kfold param?

I was looking at MATLAB Help and want to work with "crossvalind" function. It would two parameters that you can use it.

If you use "HoldOut" you can define partition size of test and train data set and when you use "Kfold" you can define "fold counts".

Now I want to know is there a way to use "Kfold" parameter and define partition size of test and train data sets?

I checked it and it seems when you use "Kfold" as bellow code, it always default partition size like 75% to 25% .

indices = crossvalind('Kfold',species,10);

K-fold means that the validation step will be performed k times, each of them using a fraction $$\frac{k-1}{k}$$ for training and $$\frac{1}{k}$$ for validation. If you want a fixed validation fraction, choose the number of folds that fits: