- fitrnet: https://www.mathworks.com/help/stats/fitrnet.html
- minibatchqueue: https://www.mathworks.com/help/deeplearning/ref/minibatchqueue.html
- Default mini batch size in fitrnet: https://www.mathworks.com/matlabcentral/answers/1761205-what-is-the-default-mini-batch-size-in-the-fitrnet-function
- Definition of mini batch size: https://www.mathworks.com/matlabcentral/answers/853535-definition-of-minibatchsize-in-matlab-training-options
Default mini-batch size in the Fitrnet function
4 views (last 30 days)
Show older comments
I have recently been using the fitrnet function from the Statistics and Machine learning toolbox in order to do regression. Although having used it for a while, I am not sure of the mini-batch size that is used when computing the gradient for training.
I have looked through the documentation for the fitrnet function but have not been able to find the answer. It does speak of iterations, but not the number of iterations per epoch.
Does anyone know where to get this information and if the function uses full-batchs, mini-batches or stochastic GD.
0 Comments
Answers (1)
Prasanna
on 9 Dec 2024
Hi Karthik,
The ‘fitrnet’ function in MATLAB's Statistics and Machine Learning Toolbox is used for training neural network regression models. The ‘fitrnet’ function does not explicitly use mini batches by default. Instead, it processes the entire dataset in each iteration, which is equivalent to using a full-batch gradient descent.
If you need to use mini-batch gradient descent, you can implement custom training loops using the ‘minibatchqueue’ function. This allows you to specify the mini-batch size and other training options. Regarding epochs and iterations, the number of iterations per epoch depends on the size of the dataset and the mini-batch size.
For more information on the same, refer to the following documentations:
Hope this helps!
0 Comments
See Also
Categories
Find more on Linear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!