Do data division input was needed in the ANN toolbox using nntool command?
4 次查看(过去 30 天)
显示 更早的评论
Hello. I have question regarding the usage of nntool for generation of neural network toolbox.
Here, i give a situtation. I have 20 number of runs (20 data). So, i want to import these input into the toolbox and train them using the network created in the nntoolbox. In the toolbox, it said that the data division is random (refer attached pic below, highlighted one).
My question is, do i need to divide again the data into training and testing set (like 15 data for training data set, other 5 is for testing data set) before importing them as input in the nntoolbox? Because I thought there were no need to import them, means I can take the 20 data set as input to be imported in the nntoolbox, since later the data division for training will randomly divided (as shown in command random for data division -refer attached picture). ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1068250/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1068250/image.png)
回答(1 个)
Avadhoot
2023-9-26
编辑:Avadhoot
2023-9-26
Hi Emi,
As you have correctly stated, there is no need to divide the input data into testing, training and validation sets before passing it to the model. The neural net fitting app in the MATLAB deep learning toolbox will take care of data splitting.
You must pass the entire data as an input to the model. You can specify the proportion in which the data will be divided by adding the following lines to your code.
net.divideParam.trainRatio = 80/100;
net.divideParam.valRatio = 10/100;
net.divideParam.testRatio = 10/100;
The default values of the above variables are as follows:
- “trainRatio”: 0.7
- “valRatio”: 0.15
- “testRatio”: 0.15
For more information about the data division variables, refer to the following link:
To understand more about the data division functions, refer the below link:
Hope it helps!
Regards,
Avadhoot.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!