Clear Filters
Clear Filters

How to insert 2D-matrix to a backpropagation neural network?

2 views (last 30 days)
I am working on speech restoration, I used MFCC to extract the features. now I have 12*57 input matrix and 12*35 target matrix for each audio clip. My question is how can I insert this 2D-matrix to a backpropagation neural network?

Accepted Answer

Greg Heath
Greg Heath on 8 May 2016
N I-dimensional "I"nput column vectors
[I N ] = size(input)
N O-dimensional "O"utput target vectors
[O N ] = size(target)
help fitnet % Regression and Curvefitting
help patternnet % Classification and Target Regression
%H = number of hidden nodes in I-H-O node topology
net = fitnet(input,target,H);
% You have a problem with I = 57, O = 35, N = 12 because even if you used all 12 images for training you would only have
Ntrn = N % 12 input/target pairs
Ntrneq = N*O % 420 training equations
whereas there are
Nw = (I+1)*H+(H+1)*O
unknown weights. Therefore, not to have fewer equations than unknowns (Ntrneq >= Nw), the number of hidden nodes H cannot be larger than the upper bound
Hub = (Ntrneq-O)/(I+O+1) = 4.1
It is more likely that you need more than H=4 hidden nodes. It is obvious from the above equation that decreasing I and/or increasing N is desired.
Alternatives are
1. Use MSEREG as the training goal
2. Use TRAINBR as the training function.
Personally, I would try input-variable reduction and/or obtain more input/target pairs.
The best inputs to keep are usually indicated via the linear coefficient model STEPWISEFIT.
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 Comment
nada fady
nada fady on 8 May 2016
Thank you very much for your clear answer. I think I wrote some thing wrong in my question, that is: I have 12*35 matrix input and 12*57 target output, so can input matrix size be smaller than target output size?

Sign in to comment.

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!