| Neural Network Toolbox Release Notes | |
| Provide feedback about this page |
Version 5.1 (R2007b) Neural Network Toolbox Software
This table summarizes what's new in Version 5.1 (R2007b):
| New Features and Changes |
Version Compatibility Considerations |
Fixed Bugs and Known Problems |
Related Documentation at Web Site |
| Yes Details below |
Yes--Details labeled as Compatibility Considerations, below. See also Summary. |
Bug Reports Includes fixes |
Printable Release Notes: PDF Current production documentation |
New features and changes introduced in this version are:
Simplified Syntax for Network-Creation Functions
The following network-creation functions have new input arguments to simplify the network creation process:
For detailed information about each function, see the corresponding reference pages.
Changes to the syntax of network-creation functions have the following benefits:
For example, to create a two-layer feed-forward network with 20 neurons in its hidden layer for a given a matrix of input vectors p and target vectors t, you can now use newff with the following arguments:
This command also sets properties of the network such that the functions sim and train automatically preprocess inputs and targets, and postprocess outputs.
In the previous release, you had to use the following three commands to create the same network:
Compatibility Considerations
Your existing code still works but might produce a warning that you are using obsolete syntax.
Automated Data Preprocessing and Postprocessing During Network Creation
Automated data preprocessing and postprocessing occur during network creation in the Network/Data Manager GUI, Neural Network Fitting Tool GUI, and at the command line.
At the command line, the new syntax for using network-creation functions, automates preprocessing, postprocessing, and data-division operations.
For example, the following code returns a network that automatically preprocesses the inputs and targets and postprocesses the outputs:
To create the same network in a previous release, you used the following longer code:
[p1,ps1] = removeconstantrows(p); [p2,ps2] = mapminmax(p1); [t1,ts1] = mapminmax(t); pr = minmax(p2); s2 = size(t1,1); net = newff(pr,[20 s2]); net = train(net,p2,t1); y1 = sim(net,p2) y = mapminmax('reverse',y1,ts1);
Default Processing Settings
The default input processFcns functions returned with a new network are, as follows:
These three processing functions perform the following operations, respectively:
fixunknowns--Encode unknown or missing values (represented by NaN) using numerical values that the network can accept.
removeconstantrows--Remove rows that have constant values across all samples.
mapminmax--Map the minimum and maximum values of each row to the interval [-1 1].
The elements of processParams are set to the default values of the fixunknowns, removeconstantrows, and mapminmax functions.
The default output processFcns functions returned with a new network include the following:
These defaults process outputs by removing rows with constant values across all samples and mapping the values to the interval [-1 1].
sim and train automatically process inputs and targets using the input and output processing functions, respectively. sim and train also reverse-process network outputs as specified by the output processing functions.
For more information about processing input, target, and output data, see Backpropagation in the Neural Network Toolbox User's Guide documentation.
Changing Default Input Processing Functions
You can change the default processing functions either by specifying optional processing function arguments with the network-creation function, or by changing the value of processFcns after creating your network.
You can also modify the default parameters for each processing function by changing the elements of the processParams properties.
After you create a network object (net), you can use the following input properties to view and modify the automatic processing settings:
net.inputs{1}.exampleInput--Matrix of example input vectors
net.inputs{1}.processFcns--Cell array of processing function names
net.inputs{1}.processParams--Cell array of processing parameters
The following input properties are automatically set and you cannot change them:
net.inputs{1}.processSettings--Cell array of processing settings
net.inputs{1}.processedRange--Ranges of example input vectors after processing
net.inputs{1}.processedSize--Number of input elements after processing
Changing Default Output Processing Functions
After you create a network object (net), you can use the following output properties to view and modify the automatic processing settings:
net.outputs{2}.exampleOutput--Matrix of example output vectors
net.outputs{2}.processFcns--Cell array of processing function names
net.outputs{2}.processParams--Cell array of processing parameters
The following new output properties are automatically set and you cannot change them:
net.outputs{2}.processSettings--Cell array of processing settings
net.outputs{2}.processedRange--Ranges of example output vectors after processing
net.outputs{2}.processedSize--Number of input elements after processing
Automated Data Division During Network Creation
When training with supervised training functions, such as the Levenberg-Marquardt backpropagation (the default for feed-forward networks), you can supply three sets of input and target data. The first data set trains the network, the second data set stops training when generalization begins to suffer, and the third data set provides an independent measure of network performance.
Automated data division occurs during network creation in the Network/Data Manager GUI, Neural Network Fitting Tool GUI, and at the command line.
At the command line, to create and train a network with early stopping that uses 20% of samples for validation and 20% for testing, you can use the following code:
Previously, you entered the following code to accomplish the same result:
pr = minmax(p); s2 = size(t,1); net = newff(pr,[20 s2]); [trainV,validateV,testV] = dividevec(p,t,0.2,0.2); [net,tr] = train(net,trainV.P,trainV.T,[],[],validateV,testV);
For more information about data division, see "Backpropagation" in the Neural Network Toolbox User's Guide documentation.
New Data Division Functions
The following are new data division functions:
dividerand--Divide vectors using random indices.
divideblock--Divide vectors in three blocks of indices.
divideint--Divide vectors with interleaved indices.
divideind--Divide vectors according to supplied indices.
Default Data Division Settings
Network creation functions return the following default data division properties:
net.divideFcn = 'dividerand'
net.divedeParam.trainRatio = 0.6;
net.divideParam.valRatio = 0.2;
net.divideParam.testRatio = 0.2;
Calling train on the network object net divided the set of input and target vectors into three sets, such that 60% of the vectors are used for training, 20% for validation, and 20% for independent testing.
Changing Default Data Division Settings
You can override default data division settings by either supplying the optional data division argument for a network-creation function, or by changing the corresponding property values after creating the network.
After creating a network, you can view and modify the data division behavior using the following new network properties:
net.divideFcn - Name of the division function
net.divideParam - Parameters for the division function
New Simulink Blocks for Data Preprocessing
New blocks for data processing and reverse processing are available. For more information, see the description of processing blocks.
The function gensim now generates neural networks in Simulink® that use the new processing blocks.
Properties for Targets Now Defined by Properties for Outputs
The properties for targets are now defined by the properties for outputs. Use the following properties to get and set the output and target properties of your network:
net.numOutputs--The number of outputs and targets
net.outputConnect--Indicates which layers have outputs and targets
net.outputs--Cell array of output subobjects defining each output and its target
Compatibility Considerations
Several properties are now obsolete, as described in the following table. Use the new properties instead.
| Recommended Property |
Obsolete Property |
net.numOutputs |
net.numTargets |
net.outputConnect |
net.targetConnect |
net.outputs |
net.targets |
| Provide feedback about this page |
![]() | Version 6.0 (R2008a) Neural Network Toolbox Software | Version 5.0.2 (R2007a) Neural Network Toolbox Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |