| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Neural Network Toolbox |
| Contents | Index |
Random order incremental training with learning functions
trainr is not called directly. Instead it is called by train for networks whose net.trainFcn property is set to 'trainr'.
trainr trains a network with weight and bias learning rules with incremental updates after each presentation of an input. Inputs are presented in random order.
trainr(net,TR,trainV,valV,testV) takes these inputs,
| net |
Neural network |
| TR |
Initial training record created by train |
| trainV |
Training data created by train |
| valV |
Validation data created by train |
| testV |
Test data created by train |
| net |
Trained network |
| TR |
Training record of various values over each epoch |
Each argument trainV, valV, and testV is a structure of these fields:
Training occurs according to trainr's training parameters, shown here with their default values:
trainr('info') returns useful information about this function.
You can create a standard network that uses trainr by calling newc or newsom. To prepare a custom network to be trained with trainr,
See newc and newsom for training examples.
For each epoch, all training vectors (or sequences) are each presented once in a different random order, with the network and weight and bias values updated accordingly after each individual presentation.
Training stops when any of these conditions is met:
| Provide feedback about this page |
![]() | trainoss | trainrp | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |