How many degrees should be counted for computing the adjusted R^2 of a neural network?
1 view (last 30 days)
Show older comments
Hi everyone,
I am trying to calculate the adusted R^2 of a network.Thus I should take into account the number of parameters of the network. The number of parameters delivered from a network with k inputs, i hidden units, 1 hidden layer kai n output should be equal to
k*l + l*n + bias hidden layer + bias in the output + k*n direct input-output connections.
Does anyone know if matlab has a bias in the output? Does anytone know if matlab calculates parameters for the direct input-output connections?
Thanks in advance
0 Comments
Accepted Answer
Greg Heath
on 15 Dec 2016
Edited: Greg Heath
on 15 Dec 2016
Consider N pairs of I-dimensional "I" nput vectors and O-dimensional "O"utput target vectors. If Ntrn is the number of training pairs, the number of training equations is
Ntrneq = Ntrn*O
If SSEtrn is the sum of squared training subset errors, corresponding mean-square-error, MSEtrn is given by
MSEtrn = SSEtrn/Ntrneq
For an I-H-O feedforward net, the number of unknown weight variables to be estimated by the training subset pairs is
Nw = (I+1)*H+(H+1)*O = O + (I+O+1)*H
resulting in the number of training degrees-of-freedom
Ntrndof = Ntrneq - Nw
Therefore, the DOF adjusted training set mean-square-error is given by
MSEtrna = SSEtrn/ Ntrndof
I have posted zillions of examples in both the NEWSGROUP and ANSWERS. Some examples can be obtained with the search words
greg MSEa
or
greg MSEtrna
Hope this helps.
Thank you for formally accepting my answer
Greg
0 Comments
More Answers (0)
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!