# Why MSE of this MATLAB neural network is so high? [duplicate]

This question already has an answer here:

I'm using this code to train a neural netowrk in MATLAB:

x = Input_data % with 13 features (unnormalized data)
t = out_data % (unnormalized data)

trainFcn = 'trainlm';  % Levenberg-Marquardt backpropagation.

% Create a Fitting Network
hiddenLayerSize = [10,5];
net = fitnet(hiddenLayerSize,trainFcn);

% Choose Input and Output Pre/Post-Processing Functions
% For a list of all processing functions type: help nnprocess
net.input.processFcns = {'removeconstantrows','mapminmax'};
net.output.processFcns = {'removeconstantrows','mapminmax'};

% Setup Division of Data for Training, Validation, Testing
% For a list of all data division functions type: help nndivide
net.divideFcn = 'dividerand';  % Divide data randomly
net.divideMode = 'sample';  % Divide up every sample
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;

% Choose a Performance Function
% For a list of all performance functions type: help nnperformance
net.performFcn = 'mse';  % Mean Squared Error

% Choose Plot Functions
% For a list of all plot functions type: help nnplot
net.plotFcns = {'plotperform','plottrainstate','ploterrhist', ...
'plotregression', 'plotfit'};

% Train the Network
[net,tr] = train(net,x,t);

% Test the Network
y = net(x);
performance = perform(net,t,y)

% Recalculate Training, Validation and Test Performance
trainTargets = t .* tr.trainMask{1};
valTargets = t .* tr.valMask{1};
testTargets = t .* tr.testMask{1};
trainPerformance = perform(net,trainTargets,y)
valPerformance = perform(net,valTargets,y)
testPerformance = perform(net,testTargets,y)

% View the Network
view(net)


Output of my neural network:

performance =

2.4135e+04

trainPerformance =

2.2552e+04

valPerformance =

1.8569e+04

testPerformance =

3.7084e+04 Why MSE and performance outputs are so high!?

## marked as duplicate by Sycorax, DeltaIV, kjetil b halvorsen, Michael Chernick, CarlJul 16 '18 at 5:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• We cannot answer this. This might be small given yours features SD (that you don't give), it might also just be the case your input features are inadequate to capture this information. An ANN is a universal function approximator but it cannot do miracles. :D Consider adding more information to your question. It is too broad to answer as it stands. – usεr11852 Dec 18 '15 at 10:41
• Well, OP gave one clue in the comments : (unnormalized data). – jeff Feb 2 '16 at 22:35