Neural Network Toolbox | Search  Help Desk |
postreg | Examples See Also |
Postprocess the trained network response with a linear regression
[m,b,r] = postreg(A,T)
postreg
postprocesses the network training set by performing a linear regression between each element of the network response and the corresponding target.
postreg(A,T)
takes these inputs,
A - 1
x Q
array of network outputs. One element of the network output.
T - 1
x Q
array of targets. One element of the target vector.
M -
Slope of the linear regression.
B - Y
intercept of the linear regression.
R -
Regression R
-value. R=1
means perfect correlation.
pca
data, simulate the network, unnormalize the output of the network using poststd, and perform a linear regression between the network outputs (unnormalized) and the targets to check the quality of the network training.
p = [-0.92 0.73 -0.47 0.74 0.29; -0.08 0.86 -0.67 -0.52 0.93]; t = [-0.08 3.4 -0.82 0.69 3.1]; [pn,meanp,stdp,tn,meant,stdt] = prestd(p,t); [ptrans,transMat] = prepca(pn,0.02); net = newff(minmax(ptrans),[5 1],{'tansig''purelin'},'trainlm'); net = train(net,ptrans,tn); an = sim(net,ptrans); a = poststd(an,meant,stdt); [m,b,r] = postreg(a,t);Performs a linear regression between the network response and the target, and then computes the correlation coefficient (
R
-value) between the network response and the target.
premnmx
,
prepca