newfit
Purpose
Create fitting network
Syntax
net = newfit(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF)
Description
newfit(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF) takes the following:
P
|
R x Q1 matrix of Q1 representative R-element input vectors.
|
T
|
SN x Q2 matrix of Q2 representative SN-element target vectors.
|
Si
|
Sizes of N - 1 hidden layers, S1 to S(N-1). Default = []. (Output layer size SN is determined from T.)
|
TFi
|
Transfer function of ith layer. Default is 'tansig' for hidden layers, and 'linear' for output layer.
|
BTF
|
Backpropagation network training function. Default = 'trainlm'.
|
BLF
|
Backpropagation weight/bias learning function. Default = 'learngdm'.
|
PF
|
Performance function. Default = 'mse'.
|
IPF
|
Row cell array of input processing functions. Default is {'fixunknowns','removeconstantrows','mapminmax'}.
|
OPF
|
Row cell array of output processing functions. Default is {'removeconstantrows','mapminmax'}.
|
DDF
|
Data division function. Default = 'dividerand'. Returns an N-layer feed-forward backpropagation network.
|
The transfer functions TF{i} can be any differentiable transfer function such as tansig, logsig, or purelin.
The training function BTF can be any of the backpropagation training functions such as trainlm, trainbfg, trainrp, traingd, etc.
Memory Requirements
trainlm is the default training function because it is very fast, but it requires a lot of memory to run. If you get an "out-of-memory" error when training, try doing one of these approaches:
- Slow trainlm training, but reduce memory requirements, by setting NET.trainParam.mem_reduc to 2 or more. (See trainlm.)
- Use trainbfg, which is slower but more memory efficient than trainlm.
- Use trainrp, which is slower but more memory efficient than TRAINBFG.
The learning function BLF can be either of the backpropagation learning functions such as learngd or learngdm.
The performance function can be any of the differentiable performance functions such as mse or msereg.
Examples
load simplefit_dataset
net = newfit(simplefitInputs,simplefitTargets,20);
net = train(net,simplefitInputs,simplefitTargets);
simplefitOutputs = sim(net,simplefitInputs);
Algorithm
newfit returns a network exactly as newff would, but with an additional plotting function, plotfit, included in the network's net.plotFcns property.
See Also
newff, newcf, newelm, sim, init, adapt, train, trains
| | Provide feedback about this page |
 | newfftd | | newgrnn |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit