フィルターのクリア

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

2 ビュー (過去 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 Center および File ExchangePattern Recognition and Classification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by