neural network with bayesian regularization: find weights and biases and recalculate the network

2 visualizaciones (últimos 30 días)
Hey,
i´m trying to use a neural network to guess functional values for unknown points. This is my current solution.
%target f(x)=(x^2 + 22*x - 100)/(4*x)
%for x = [2,9]
inputall = 2:0.01:9;
outputall = (inputall.^2+22*inputall-100)./(4*inputall);
%training data
inputtrain = 2:1:9;
outputtrain = (inputtrain.^2+22*inputtrain-100)./(4*inputtrain);
%neural network
neurons = 5;
net = feedforwardnet(neurons,'trainbr');
net = train(net,inputtrain,outputtrain);
%prediction
predict(1,:) = net(inputall);
%comparison
comp = [outputall' predict']
%visualization
figure('Name','comparison'); hold on;
plot(inputall,outputall);
plot(inputall,predict)
Now I want to know what weights and biases the network finaly used. How can i get them and is it possible to use them to recalculate by myself the solution of the network?
Best regards
Michael

Respuesta aceptada

Sai Veeramachaneni
Sai Veeramachaneni el 15 de Dic. de 2020
Hi,
You can use net.IW, net.LW, net.b properties of neural network object to get weights and biases used in the network.
You can use this as a reference to calculate solution using the constructed network.
References:
  1 comentario
Michael Arnold
Michael Arnold el 15 de Dic. de 2020
Editada: Michael Arnold el 15 de Dic. de 2020
Thanks, that helps a lot. But i have trouble to find lines like
net.input.processFcns = { }; % Remove normalization
by my own. Have you a good tip where i can finde them? And can i see somewhere the code behind "net"?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by