Fred_wsa asked . 2021-07-22

Weights in Neural networks

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?

neural network , weight , input selection

Expert Answer

John Williams answered . 2024-05-18 06:01:37

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.
 
The resulting normalized MSEtrn, NMSEtrn = MSEtrn/var(Ttrn,1,2) or biased Rsquare = 1-NMSEtrn is tabulated in a Ntrials by numH matrix and examined. I tend to use Ntrials = 10 and restrict H so that Nw <= Ntrneq.
 
Examples can be obtainedby searching the NEWSGROUP and ANSWERS using the keywords heath Nw Ntrials
Mitigating the bias of evaluating with training data can be achieved by either
    a. Dividing SSE by the degree-of-freedom adjusted denominator Neqtrn-Nw 
    (instead of Ntrneq) or

    b. Using a separate holdout validation set ( which is not necessarily used for validation stopping)

    Hope this helps.


Not satisfied with the answer ?? ASK NOW

Frequently Asked Questions

MATLAB offers tools for real-time AI applications, including Simulink for modeling and simulation. It can be used for developing algorithms and control systems for autonomous vehicles, robots, and other real-time AI systems.

MATLAB Online™ provides access to MATLAB® from your web browser. With MATLAB Online, your files are stored on MATLAB Drive™ and are available wherever you go. MATLAB Drive Connector synchronizes your files between your computers and MATLAB Online, providing offline access and eliminating the need to manually upload or download files. You can also run your files from the convenience of your smartphone or tablet by connecting to MathWorks® Cloud through the MATLAB Mobile™ app.

Yes, MATLAB provides tools and frameworks for deep learning, including the Deep Learning Toolbox. You can use MATLAB for tasks like building and training neural networks, image classification, and natural language processing.

MATLAB and Python are both popular choices for AI development. MATLAB is known for its ease of use in mathematical computations and its extensive toolbox for AI and machine learning. Python, on the other hand, has a vast ecosystem of libraries like TensorFlow and PyTorch. The choice depends on your preferences and project requirements.

You can find support, discussion forums, and a community of MATLAB users on the MATLAB website, Matlansolutions forums, and other AI-related online communities. Remember that MATLAB's capabilities in AI and machine learning continue to evolve, so staying updated with the latest features and resources is essential for effective AI development using MATLAB.

Without any hesitation the answer to this question is NO. The service we offer is 100% legal, legitimate and won't make you a cheater. Read and discover exactly what an essay writing service is and how when used correctly, is a valuable teaching aid and no more akin to cheating than a tutor's 'model essay' or the many published essay guides available from your local book shop. You should use the work as a reference and should not hand over the exact copy of it.

Matlabsolutions.com provides guaranteed satisfaction with a commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been empanelled after extensive research and quality check.

Matlabsolutions.com provides undivided attention to each Matlab assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work done at the best price in industry.