| Prev | Next | Start of Chapter | End of Chapter | Contents | Index | (6 out of 7)

Five Fold CV


The Five Fold CV block helps you determine whether you have chosen the best neural network configuration for your problem. You can use it to test a data set against different types of neural networks or different configurations of the same type of neural network. It splits the data set into five subsets and then trains and tests your network a total of five times, each time using a different one of the five subsets for training.


Note: The Train and Test block is an encapsulation block that contains a NeurOn-Line diagram on its subworkspace.
Attach the Five Fold CV block's top action link to your data set and the bottom action link to your neural network. You cannot attach more than one neural network or data set to the block.

To configure the Five Fold CV block, choose configure from its menu. It displays two dialogs, one on top of the other. They are for the Training and Fit Tester blocks that are on the Five Fold CV block's subworkspace. For more information on how to configure them, see "Trainer" and "Fit Tester".

To evaluate the Five Fold CV block, you must pass it a control signal. The block randomly divides the data set into five subsets of equal size. It trains and tests your neural network five times. The first time, it trains the network with the first subset and tests it with the other four. The second time, it trains the network with the second subset and tests it with the other four. The block continues until its trained and tested the block five times, each time using a different fifth of the data set for training.

When the block has finished all the iterations, it passes a control signal and two scalar values. The scalar value from its top output port is the median value of the results from the Trainer block. The scalar value from its bottom port is the median value of the results from the Fit Tester block. The meaning of these values depends on how you configured the Trainer and Fit Tester blocks. For more information on these values, see "Trainer" and "Fit Tester".

In each case, the training error is an indicator of how well the network fits the training data. The error will generally decrease if you expand the network architecture, even when the network is overfitting. Therefore, do not use the training error to select the optimum network architecture.

The test error indicates how well the network fits data not used in training. In general, you should select the smallest network architecture that minimizes the test error. This value will increase or stay nearly constant when the network is too large.

Configuring

When you choose configure from the block's menu, it displays two dialogs, one for configuring the Training block and the other for configuring the Fit Tester block, both of which are on the Five Fold CV block's subworkspace.

For information on configuring the Training block, see "Configuring".

For information on configuring the Fit Tester block, see "Configuring":

Example

This example uses Five Fold CV blocks to see which of three neural network configurations is the best. All networks use exactly the same data set. To determine which configuration fits the data best, look at the number passed from the bottom port of the Five Fold CV block. The lower the number, the better the fit for data not seen in the training process.


See Also

For more information on how to use this block, see the pages below.

Click here for more information...
Basic Block Behavior
"Neural Network Blocks" Chapter
Data Set
Trainer
Fit Tester
Train and Test

| Prev | Next | Start of Chapter | End of Chapter | Contents | Index | (6 out of 7)

Copyright © 1996, Gensym Corporation, Inc.