MATLAB Answers

I am working on ANN toolbox, but i m not getting idea as in what will be the input and what will be the target value???

4 views (last 30 days)
aditi patil
aditi patil on 30 Jan 2016
Answered: Sandeep Nayak on 29 Sep 2019
I am working on like to detect the vibration signal with help of wavelet and to classify whether it is normal,outer race fault or inner race fault with help of ANN. In such case after applying wavelet I am extracting the features like energy,kurtosis,skewness,crest factor and RMS value which will be acting as input to my ANN. but how to exactly apply those input am not getting.
aditi patil
aditi patil on 2 Feb 2016
Thanks for the reply sir. I am still not getting on what basis we should select the training function and learning function. Can someone explain me with some application or some example so that I can apply it my application.

Sign in to comment.

Accepted Answer

Greg Heath
Greg Heath on 1 Feb 2016
If you have N input/target pairs for I-dimensional inputs to be classified into one of c-classes characterized by class indices 1:c, the input and target matrices have sizes
[ I N ] = size(input)
[ c N ] = size(target)
where target columns are c-dimensional {0,1} unit vectors from the unit matrix eye(c).
The relationship between the true class indices and the target matrix are
target = ind2vec(trueclassindices)
trueclassindices = vec2ind(target)
Similarly, the relationship between the estimated class indices and the classifier output are
estimatedindices = vec2ind(output);
Then correct classifications and errors are obtained from
errors = (estimatedindices ~= classindices);
Nerrors = sum(errors)
Pcterr = 100*Nerrors/N
Class and trn/val/tst division breakdowns can be obtained by knowing the datadivision indices obtained from the training record tr
[ net tr output ] = train(net, input, target);
You can probably find several examples by searching the NEWSGROUP and ANSWERS using
greg patternnet
Hope this helps.
Thank you for formally accepting my answer
Greg Heath
Greg Heath on 9 Feb 2016
I have already told you to search for my PATTERNNET posts.
But first, see the example in the documentation:
help patternnet
doc patternnet
Write back if you have anymore questions regarding the above.
Hope this helps.

Sign in to comment.

More Answers (2)

Walter Roberson
Walter Roberson on 31 Jan 2016
Create a 2D array, with one row per sample, and with the columns being energy, kurtosis, skewness, crest factor, and RMS value. Call this "input"
Create a 1D column vector, ind, one row per sample, which is 1 for samples that are normal, 2 for samples that are outer race fault, 3 for samples that are inner race fault.
Call < ind2vec()) passing in that column vector, and saving the result as the variable "target".
Now pass the variables input and target to your neural network routine.

Sandeep Nayak
Sandeep Nayak on 29 Sep 2019
Dear guys,
I want to know how to write code in matlab function in order to detect the fault using wavelet transform. I have four output signal data. But after fault are varying randomly but at the time of fault the respective signal have some discontinuity which others havenot. How to detect that particular instant in matlab code. I used wenergy command but that didnot work in simulink. The error was like this,"can`t generate the code". Please guide me. It is very essential


Community Treasure Hunt

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

Start Hunting!