Outputs of the second layer in PNN neural network

1 回表示 (過去 30 日間)
sameh marmouch
sameh marmouch 2019 年 1 月 28 日
回答済み: Snehal 2025 年 2 月 19 日
How to get the output response of the second layer in PNN network when use the command : newpnn in matlab.

回答 (1 件)

Snehal
Snehal 2025 年 2 月 19 日
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!

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by