How do I prepare input matrix & target matrix for Neural Networks?

조회 수: 1 (최근 30일)
Adwait
Adwait 2013년 2월 11일
I’m developing an offline OCR system for Devanagari Characters for 20 alphabets. There are 100 samples per alphabet (i.e. 2000 samples). I’ve extracted 4 features per sample. For training a Neural Network, how do I prepare input matrix and target matrix? Is a 4x2000 matrix (4 is no of features & 2000 is total no of samples collected), a correct way of preparing input matrix? Should the samples in input matrix be sequential or random? Also, considering 20 alphabets, should there be 20 classes? How should my target matrix look like? Should it be 20x2000?

채택된 답변

Greg Heath
Greg Heath 2013년 2월 12일
>Is a 4x2000 matrix (4 is no of features & 2000 is total no of samples collected), a correct way of preparing input matrix?
Yes
>Should the samples in input matrix be sequential or random?
With default batch training (e.g.,trainlm or trainscg) it doesn't make any difference.
However, with sequential training (e.g., adapt) randomize.
>Also, considering 20 alphabets, should there be 20 classes?
Yes
> How should my target matrix look like? Should it be 20x2000?
Yes. Each column should be a column from the 20-dimensional unit matrix eye(20).
Use ind2vec to create the target matrix t from the true integer class indices.
Use vec2ind to obtain predicted class indices from the output y.
Nerr = sum(predclassind ~ trueclassind)
Hope this helps.
Thank you for formally accepting m answer!
Greg

추가 답변 (1개)

Sugumar
Sugumar 2013년 2월 27일
its any rules to create a neural network depending upon inputs

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by