Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES

 Documentation /  Neural Networks /  Application Examples /  Classification of Paper Quality /

IntroductionRBF Network

12.1.1 VQ Network

First, try a vector quantization network on the paper data. You need at least one codebook vector for each class, a minimum of six codebook vectors. More information on the VQ network can be found in Chapter 11, Vector Quantization. The result will vary each time the commands are evaluated, due to the random nature of the initialization and training processes.

Load Neural Networks, the additional Mathematica standard add-on package, and the data.

In[1]:=

In[3]:=

Initialize a VQ network with six codebook vectors and train it ten iterations with the Competitive algorithm.

In[4]:=

Obtain some information about the trained network.

In[5]:=

Out[5]=

The trained VQ network can now be used to classify paper samples by simply applying it to new data vectors.

Use the trained VQ network to classify data sample 15 of the validation data.

In[6]:=

Out[6]=

The classification result can also be illustrated using NetPlot. Using NetPlot on a data set with more that two dimensions produces a bar chart with the correctly classified samples on the diagonal. It is interesting to compare the classification results of the estimation and validation data.

Present the classification evaluated using estimation data.

In[7]:=

Present the classification evaluated using validation data.

In[8]:=

From the plots, it is clear that most samples were correctly classified by the VQ network, although no perfect classifications were obtained on the validation data. The off-diagonal bars correspond to incorrectly classified data and the x and y axes show from which classes they come. Another way to illustrate this is to use the option Table.

Illustrate the classification on validation data with a table.

In[9]:=

Each box illustrates the data assigned to a class. For example, the second box from the left shows that six data samples from class 2 were assigned to the second class. Note that this may turn out differently if you repeat the example.

You can also look at how the classification improves for each class as a function of the number of training iterations. In this way you can see if there is a problem with any specific class.

Plot the progress of the classifier on the validation data.

In[10]:=

The dashed lines indicate incorrectly classified data.

IntroductionRBF Network


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information



 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: