Predict output values from trained neural network
显示 更早的评论
Data set attached.
I have a trained neural network:
% Fit a feedforward neural network to a set of FDM processing data.
% Analysis of errors, computationally and visually.
%
% Input: fdm_trainingdata.m file
% Table with columns for:
% layer thickness [mm], deposition speed [mm/s], elastic modulus [MPa],
% tensile strength [MPa]
% Separate arrays that define the 5 layer thicknesses and 5 deposition
% speeds
%
% Output:
% surface plots of neural network fit of elastic modulus and strength
% errors between predictions of modulus and measured values
% quadratic polynomial regression fits of modulus and strength
clear
% Read file; variables are 'trainingdata,' 'missing,' 'layerthick,'
% 'speed' and 'inputmat'
run('fdm_trainingdata.m');
inputs = trainingdata(:,1:2)';
targets = trainingdata(:,3:4)';
%nvar = length(layerthick);
% Create a Fitting Network
hiddenLayerSize = [15 15];
net = fitnet(hiddenLayerSize);
% Set up Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 1;
net.divideParam.valRatio = 0;
net.divideParam.testRatio = 0;
% Train the Network
[net,tr] = train(net,inputs,targets);
% Test the Network
outputs = net(inputs);
errors = gsubtract(outputs,targets);
performance = perform(net,targets,outputs)
% View the Network
view(net)
I need generate the modulus and strength prediction plots using matrices that are at least 25x26 in size.
How do I generate predictions using the trained network? I need to generate input vectors of (25x25 =) 625 elements so that I can plot the results using surf command.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

