Outputs of the second layer in PNN neural network

1 visualización (últimos 30 días)
sameh marmouch
sameh marmouch el 28 de En. de 2019
Respondida: Snehal el 19 de Feb. de 2025
How to get the output response of the second layer in PNN network when use the command : newpnn in matlab.

Respuestas (1)

Snehal
Snehal el 19 de Feb. de 2025
Hello,
In a Probabilistic Neural Network (PNN) created using MATLAB's ‘newpnn’ function, the layers are structured as follows:
  1. Input Layer: Passes the input features directly to the pattern layer without any computation
  2. Pattern Layer (First Computational Layer): Computes similarity scores between the input and each training sample using a radial basis function
  3. Summation Layer (Second Computational Layer): Aggregates the outputs from the pattern layer for each class
  4. Decision Layer (Output Layer): Determines the class with the highest aggregated score
The Summation Layer is considered the second computational layer in a PNN, and my understanding is that you want to extract the output responses for this layer. You can use the following code snippet for implementing this:
% Let’s assume that you have already created a PNN using the following command:
% net = newpnn(P,T,spread);
% where P: matrix of input vectors
% T : matrix of target class vectors
% spread: Spread of radial basis functions
% the syntax that you can use to get the output responses is:
patternLayerOutput = radbas(dist(net.IW{1,1}, inputSample) * spread);
summationLayerOutput = net.LW{2,1} * patternLayerOutput;
Additionally, you may refer to the following documentation links for more details:
Hope this helps!

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by