Now I have 50 images and they are decomposed into 5 input vectors for each. Which means now I have 5 x50 array. If 40 images belongs into one class and 10 belongs to another. What should I do in the Target Class value? Should the Target vector 1 dimensional or 2 dimensional array? Thanks
And How can I know the accuracy from the performance chart?
Subject: How to set Target vector in Neural Network?
On Mar 2, 7:44 pm, "Tak " <lauho...@hotmail.com> wrote:
> Now I have 50 images and they are decomposed into 5 input vectors for each. Which means now I have 5 x50 array.
How do you represent an image with only 5 values?
The smallest images I have encountered are 3 X 5
binary images of integers. Therefore each image
is represented by 15 values, i.e., a 15-dimensional
input vector. The resulting dimensionality of a data
containing 50 images would be 15 X 50.
What kind of images do you have and what do the
5 values represent?
If 40 images belongs into one class and 10 belongs to another. What
should I do in the Target Class value? Should the Target vector 1
dimensional or 2 dimensional array?
For two classes one output is typical. The target
values are unipolar binary with values from {0,1}.
For more classes use one output for each class.
> And How can I know the accuracy from the performance chart?
You need an independent nontraining set to obtain
an unbiased estimate of generalization error.
Use 10-fold cross-validation:
1. Randomly partition Class 0 into 10 subsets of 4 images
each and partition Class 1 into 10 subsets of 1 image
each.
2. Form a 10 subset mixture with each subset containing
4 Class 0 images and 1 Class 1 image.
3. Repeat the following steps 10 times
a. Use one of the subsets as a test set to
obtain an unbiased estimate of generalization
error.
b. Use the other 9 subsets to form a training set.
c. To avoid biasing caused by the unbalanced
composition of the training set, add 4
duplicates of each Class 1 case so that
the training set contains 36 cases from each
class.
d. Train a net using the training set and estimate
the error using the test set.
4. Obtain the average and standard deviation of the
10 error estimates obtained in 3d.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.