Help Topics Concepts Package Class

## Neural Classifer Agent Properties and Use

### Properties

The Neural Classifier Agent panel provides these options:

Training File Name
  Enter the name of a definition file. Use the Browse button to select a definition file. This file will be used to specify the network architecture's input value since it defines the number of fields and their data type. One of the fields must have a field name of class to support supervised learning. The data itself must be a file by the same name with a .dat extension. This will be used when the mode is Train and also to Generate Beans.
Testing File Name
  Enter the name of a definition file with the same layout as the training definition file. Use the Browse button to select a definition file. This will be used when you set the mode to Test and also when the training process uses Test mode to conditionally end training.
Agent Mode
  Select one of the following agent modes:
  Train implies that the network bean's weights are unlocked, and the import bean referencing the Training File provides the active data buffer connection.
  Test implies that the network bean's weights are locked, and the percent correct is calculated; the import bean referencing the Testing File provides the active data buffer connection.
  Run implies that the network bean's weights are locked and the percent correct is not calculated.
Test/Train Ratio
  Once the desired accuracy specified by Minimum Percent Correct is attained from training, this value controls additional training required to improve the network accuracy calculated from the test data. A ratio of 10 means that the network trains with the training data for 10 passes before switching to the test data to calculate the number of records in the test data that are classified correctly by the network bean.
Network Architecture
  The architecture consists of five parameters:
  1. Inputs, which is calculated when beans are generated from the Training File.
  2. Hidden1, which is the number of hidden units in the first layer.
  3. Hidden2, which is the number of hidden units in the second layer.
  4. Hidden3, which is the number of hidden units in the third layer.
  5. Outputs, which is calculated when beans are generated from the Training File.
Minimum Percent Correct
  The threshold value for the minimum number of records which the network must accurately classify. Training the network stops when this threshold is attained. If test data is supplied, training continues until the results from the test data reach this level.
Error Tolerance
  In Train or Test modes, errors are calculated for each record and compared to the Tolerance value. Errors greater than the tolerance value indicate a bad calculation. If the error is within the tolerance, it is treated as 0. Tolerance must be a real value between 0.0 and 1.0. Generally the tolerance for Test mode is higher than the tolerance in Training mode.
Maximum Number of Passes
  The threshold value for the maximum number of passes. Training the network will stop if this threshold is attained regardless of the calculated Minimum Percent Correct.

### Use

The Neural Classifer Agent panel is used to generate an agent containing import beans for training and testing, a BackPropagation bean, filter beans to translate network inputs and outputs, and data connections. The Agent Mode is set so that the network bean can be trained or used to provide an independant data source to test that training is sufficient.

Steps in using the panel for training include:

1. Enter the name of the training file that defines the record layout and name of the training data source. If the file is read successfully, the Generate Beans button should be enabled.
2. Select Train for the Agent Mode.
3. Set the values for hidden unit layers.
4. Press the Generate Beans button. The Start Training button should now be enabled.
5. Change the tolerance values if desired - a lower training tolerance will provide more accuracy but possibly relatively less generalizing capability and more time will be needed to train the network.
6. Set the Minimum Percent Correct and Maximum Passes values to control when training will stop. The Minimum Percent Correct determines the network's classification accuracy while the Maximum Passes provides an alternate endpoint should the desired accuracy be unachievable in a reasonable period of time.
7. Press the Start Training button to begin processing records through the data buffer connections. Once training has begun, this button will toggle to Stop Training. Training will continue until the toggled button is pressed, the Minimum Percent Correct value is met, or the Maximum Passes value is attained.
8. You may wish to press the Stop Training button, change an accuracy threshold, and start again. If you change the network architecture, press Generate Beans for the changes to take effect. Press the Reset Beans button to re-initialize the network weights before starting training again if you wish.
9. After the network bean has trained to the specified accuracy with the training data, the training process internally switches to Test mode. It will enable the data buffer from the test import bean to calculate the classification accuracy for the test data with the network weights locked. If the required percentage of records in the test data set are within the Tolerance, training stops. Otherwise training continues for the number of passes specified by Train/Test Ratio before the accuracy is again calculated from the test data.