<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245736</link>
    <title>MATLAB Central Newsreader - How to set Target vector in Neural Network?</title>
    <description>Feed for thread: How to set Target vector in Neural Network?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 03 Mar 2009 00:44:02 -0500</pubDate>
      <title>How to set Target vector in Neural Network?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245736#632017</link>
      <author>Tak </author>
      <description>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&lt;br&gt;
&lt;br&gt;
And How can I know the accuracy from the performance chart?</description>
    </item>
    <item>
      <pubDate>Tue, 03 Mar 2009 02:42:21 -0500</pubDate>
      <title>Re: How to set Target vector in Neural Network?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245736#632025</link>
      <author>Greg Heath</author>
      <description>On Mar 2, 7:44 pm, &quot;Tak &quot; &amp;lt;lauho...@hotmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Now I have 50 images and they are decomposed into 5 input vectors for each. Which means now I have 5 x50 array.&lt;br&gt;
&lt;br&gt;
How do you represent an image with only 5 values?&lt;br&gt;
The smallest images I have encountered are 3 X 5&lt;br&gt;
binary images of integers. Therefore each image&lt;br&gt;
is represented by 15 values, i.e., a 15-dimensional&lt;br&gt;
input vector. The resulting dimensionality of a data&lt;br&gt;
containing 50 images would be 15 X 50.&lt;br&gt;
&lt;br&gt;
What kind of images do you have and what do the&lt;br&gt;
5 values represent?&lt;br&gt;
&lt;br&gt;
If 40 images belongs into one class and 10 belongs to another. What&lt;br&gt;
should I do in the Target Class value? Should the Target vector 1&lt;br&gt;
dimensional or 2 dimensional array?&lt;br&gt;
&lt;br&gt;
For two classes one output is typical. The target&lt;br&gt;
values are unipolar binary with values from {0,1}.&lt;br&gt;
For more classes use one output for each class.&lt;br&gt;
&lt;br&gt;
&amp;gt; And How can I know the accuracy from the performance chart?&lt;br&gt;
&lt;br&gt;
You need an independent nontraining set to obtain&lt;br&gt;
an unbiased estimate of generalization error.&lt;br&gt;
&lt;br&gt;
Use 10-fold cross-validation:&lt;br&gt;
&lt;br&gt;
1. Randomly partition Class 0 into 10 subsets of 4 images&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;each and partition Class 1 into 10 subsets of 1 image&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;each.&lt;br&gt;
2. Form a 10 subset mixture with each subset containing&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;4 Class 0 images and 1 Class 1 image.&lt;br&gt;
3. Repeat the following steps 10 times&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;a. Use one of the subsets as a test set to&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;obtain an unbiased estimate of generalization&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;b. Use the other 9 subsets to form a training set.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;c. To avoid biasing caused by the unbalanced&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;composition of the training set, add 4&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;duplicates of each Class 1 case so that&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;the training set contains 36 cases from each&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;class.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;d. Train a net using the training set and estimate&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;the error using the test set.&lt;br&gt;
4. Obtain the average and standard deviation of the&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;10 error estimates obtained in 3d.&lt;br&gt;
&lt;br&gt;
Hope this helps.&lt;br&gt;
&lt;br&gt;
Greg</description>
    </item>
  </channel>
</rss>

