Displaying MSE values at training,validation and testing ratios
6 次查看(过去 30 天)
显示 更早的评论
Just started learning about neural networks and have been using the neural net fitting tool box. I've taken the code and tried adding an extra layer which has been successful but i dont know how to find these MSE values?
heres my code:
% Solve an Input-Output Fitting problem with a Neural Network
% Pressure - input data.
% Output - target data.
input=xlsread('NEW DATA.xlsx',1,'E7:E39');
x = input';
output=xlsread('NEW DATA.xlsx',1,'H7:I39');
t = output';
% Choose a Training Function
trainFcn = 'trainlm'; % Levenberg-Marquardt backpropagation.
% Create a Fitting Network
hiddenLayer1Size = 80;
hiddenLayer2Size = 40;
net = fitnet([hiddenLayer1Size hiddenLayer2Size],trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 80/100;
net.divideParam.valRatio = 5/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,x,t);
% Test the Network
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
view(net)
0 个评论
回答(1 个)
Vimal Rathod
2020-2-26
Hi,
Below is a link to similar question which could be of your use.
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!