I have used the built-in function called 'divideint' to divide my data for training, validation, and testing. Want to know if the data is randomly picked for training.

2 vues (au cours des 30 derniers jours)
Hello,
The code for dividing the data into training, validation, and testing that I used is
model.divideFcn = 'divideint';
I have 4800 experimental data points. I want to know how these data points are used for training, validation, and testing. Is 70% of the data randomly picked for training. In the mathworks, it is mentioned that 'divideint' works by dividing the data using an interleaved selection. What that means. I want to know which data points are utilized for which purpose exactly.
Thank you!

Réponses (1)

Mandar
Mandar le 9 Fév 2023
You can type the following command in the command window to know more about the function parameters such as inputs, outputs and process followed to accomplish the outputs. The following information is observed in MATLAB R2022a in addition to documentation.
help divideint
DIVIDEINT Partition indices into three sets using interleaved indices. [trainInd,valInd,testInd] = divideint(Q,trainRatio,valRatio,testRatio) takes a number of samples Q and divides up the sample indices 1:Q between training, validation and test indices. divideint starts with index 1, and alternately assigns each index to whichever one of the three sets will help best match the desired ratios until all Q indices are assigned. For example, here 250 samples are divided into 70% for training, 15% for validation and 15% for testing. [trainInd,valInd,testInd] = divideint(250,0.7,0.15,0.15) Here is how to ensure a network will perform the same kind of data division when it is trained: net.divideFcn = 'divideint'; net.divideParam.trainRatio = 0.7; net.divideParam.valRatio = 0.15; net.divideParam.testRatio = 0.15. See also divideblock, divideind, dividerand, dividetrain. Documentation for divideint doc divideint

Community Treasure Hunt

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

Start Hunting!

Translated by