MATLAB: What is the difference between feedforwardnet with fitnet

neural network

I would like to know the difference between the two. The definitions in matlab documents do not say exactly how they differ and when they recommend be used.
thanks

Best Answer

To see source code use the TYPE function:
type newfit
type patternnet
type feedforwardnet
FEEDFORWARDNET is general function that includes
1. FITNET for regression (MATLAB calls it curve fitting) which is supposed to be a replacement for NEWFF)
2. PATTERNNET for pattern recognition and classification ( which were previously achieved using NEWFF)
Except for the choice of training function TRAINSCG in PATTERNNET, the first 99 lines of FITNET, PATTERNNET and FEEDFORWARDNET are basically the same.
Not sure if FEEDFORWARDNET is accessible via a GUI (You should verify this)
Then:
The last 4 lines of FITNET are a call to FEEDFORWARDNET:
function net = create_network(param)
net = feedforwardnet(param.hiddenSizes,param.trainFcn);
net.plotFcns = [net.plotFcns {'plotfit'}];
end
Similarly, the last 6 lines of PATTERNNET are a call to FEEDFORWARDNET:
function net = create_network(param)
net = feedforwardnet(param.hiddenSizes,param.trainFcn);
net.layers{net.numLayers}.transferFcn = 'tansig';
% Unnecessary. It is a FEEDFORDWARDNET default
net.plotFcns = {'plotperform','plottrainstate','ploterrhist',...
'plotconfusion','plotroc'};
end
Hope this helps.
Greg