Mathematica 9 is now available

Classification of Paper Quality Using Neural Networks:
Vector Quantization Network

First, try a vector quantization (VQ) network on the paper data. You need at least one codebook vector for each class, a minimum of six codebook vectors. Due to the random nature of the initialization and training processes, the result will vary each time the commands are evaluated.

Load the Mathematica application package Neural Networks and the data.

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

Obtain some information about the trained network.

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.

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.

Present the classification evaluated using validation data.

Although no perfect classifications were obtained on the validation data, it is clear from the plots that most samples were correctly classified by the VQ network. 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.

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.

The dashed lines indicate incorrectly classified data.