I've tried to reproduce the results I got from a trained network but was unable. Here's my script:
load 'C:\Users\ZA\Documents\cosjacorr.mat'inputs = cosjacorr(:, 1:9)';targets = cosjacorr(:, 10:13)';numHiddenNeurons = 2; % Adjust as desired
net = newpr(inputs,targets,numHiddenNeurons);net.divideParam.trainRatio = 75/100; % Adjust as desirednet.divideParam.valRatio = 15/100; % Adjust as desirednet.divideParam.testRatio = 10/100; % Adjust as desirednet.inputs{1}.processFcns = {}; net.outputs{2}.processFcns = {};% Train and Apply Network
[net,tr] = train(net,inputs,targets);outputs = sim(net,inputs);% Plot
plotconfusion(targets,outputs)
I removed all pre and post processing hoping that I would be able to reproduce the results but was unsuccessful.
Here's what I did in terms of replicating the network's output:
y1 = tansig(net.IW{1} * input + net.b{1}); Results = tansig(net.LW{2} * y1 + net.b{2});
Can someone please help me out? thanks.
PS. I can even send the entire data file to you if it will help.
Best Answer