Weights in Neural networks

Technical Source
2 min readJul 22, 2021

--

I am training a simple BP neural network with 8 inputs, 1 output and 1 hidden layer with 10 nodes in it. my weight matrices is a set of numbers between -1 and 1; but I can not get a physical meaning about these weights. Are weights in accordance with importance of the inputs in the model? shouldn’t I get higher weights for inputs which are more correlated with the output? how can get a physical meaning about resulted weights?

ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

It tends to be difficult, if not impossible, to understand weight configurations when one or more of the following conditions exist

a. The number of input variables, I, is large.    b. Some input variables are correlated.    c. The number of hidden nodes, H, is large.    d. The number of output variables, O, is large.

With an I-H-O = 8–10–1 node topology, there are Nw = net.numWeightElements = (I+1)*H+(H+1)*O = 90+11 = 101 unknown weights to be estimated by Ntrneq = prod(size(Ttrn)) = Ntrn*O training equations. With Nw large, nonlinear optimization solutions tend to be nonrobust unless Ntrneq >> Nw.

If odd activation functions like tansig are used, each local minimum is associated with 2^H * H! weight configurations related by changing the signs of the weights attached to each hidden node (2^H) and reordering the position of the hidden nodes (H!).

The best bet is to (not necessarily in order of effectiveness)

1. Reduce the input dimensionality I as much as possible. Each reduction by 1 reduces Nw by H. Simple approaches are

a. Use STEPWISEFIT or SEQUENTIALFS with polynomial models that are 
linear in the weights.
b. After training, rank the inputs by the increase in MSE when only the
matrix row of that input is scrambled (i.e., randomly reordered ). Remove
the worst input, retrain and repeat untill only useful inputs remain.
c.Transform to dominant orthogonal inputs using PCA for regression or PLS
for classification.

2. Reduce the number of hidden nodes, H, as much as possible. Each reduction by 1 reduces Nw by I+O+1 . My approach is to obtain numH*Ntrials separate designs where numH is the number of candidate values for H and Ntrials is the number of different weight initializations for each candidate.

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet