How can I get the internal structure of idNeuralNetwork (Regressio​nNeuralNet​work) used in NLAR

8 views (last 30 days)
I have generated the identification of an error from the function sys = nlarx(z,R,NL), where NL=idNeural Network and I would like to know the internal structure (what operations are carried out and with what weights). Thanks!!

Answers (1)

Shantanu Dixit
Shantanu Dixit on 24 Apr 2025
Edited: Shantanu Dixit on 24 Apr 2025
Hi Daniel,
If I understood the query correctly, you're creating a nonlinear ARX model using 'nlarx' with a neural network nonlinearity ('idNeuralNetwork') and would like to examine its internal structure, including the operations and weights.
The neural network component in the model processes the regressors through multiple layers with specified activation functions. For example:
NL = idNeuralNetwork([10 5 2], ["relu", "tanh", "swish"])
After creating a nonlinear ARX model using 'nlarx' : sys = nlarx(z,R,NL), you can access the weights and architecture through 'Network' property of idNeuralNetwork as follows:
nn = sys.Nonlinearity;
disp(nn.Network.Parameters.Learnables(1))
% Name: "fc1_Weights"
% Value: ...
% Free: ...
% Parameters contains the learnable hyperparameters and initial hyperparameter values used by the network
% Learnables — Vector of tunable parameters that represent the weights and biases for the network
You can also refer to the 'idNeuralNetwork' documentation: https://www.mathworks.com/help/ident/ref/idneuralnetwork.html for more information.
Hope this helps!
  1 Comment
Daniel
Daniel on 24 Apr 2025
Thanks!! And how can I know the intern opperations that are carried out with those weigths and bias in order to get the final estimation of the NN?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!