1
votes

I am kind of new to neural network. This is one piece of code I've tried in Matlab

P= 0 + (rand(1) * 10);
T = (P-1)/(P+1);
net = newelm(P,T,5);
net = train(net,P,T);
Y = sim(net,P);

Now when I type net.B{1} and net.LW{1} in the command window of matlab, I get the bias weights and layer weights, but I also find that these weight values keep changing according to input values.

So can I have a predefined weight value, the one that doesn't change, for a particular function(and for any value of input), such that using these weight values I can design a neural network for a particular function. Like here I have T which is related to P by a particular equation.

1

1 Answers

0
votes

If one of your inputs has a known relation to the output variable, take it out of the network instead of creating a complex workaround like fixing network weights. (It will be complex because of the variable interactions and nonlinear transformations inside the network.)

E.g.

Y = a*X1 + 3.6*X2  # relationship between Y and X2 is known

Then use neural network on this relation:

Y - 3.6*X2 = a*X1
^^^^^^^^^^   ^^^^
[target]     [input]