ENVITrainClassifier
This procedure trains a classifier. It updates the original classifier instead of creating a new output classifier.
The following diagrams show typical workflows where this procedure is used:
Example
See the following topics:
Syntax
ENVITrainClassifier, Input_Trainer, Input_Classifier, Input_Examples [, Keywords=value]
Arguments
Input_Trainer
Specify an input trainer; for example, an ENVIGradientDescentTrainer object.
Input_Classifier
Specify an input classifier; for example, an ENVISoftmaxRegressionClassifier or ENVISVMClassifier object.
Input_Examples
Specify an input ENVIExamples object.
Keywords
ERROR (optional)
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
LOSS_PROFILE (optional)
Set this keyword to an output array of values showing the loss as a function of iterations. The result is an array of loss values, with one initial value plus one value per iteration.
Loss is a measure of how closely the classifier algorithm fits the examples. In general, the loss decreases with each iteration until it stops changing. A loss of zero would indicate a perfect fit, but a perfect fit is not necessarily desired. The goal of training is to predict new examples correctly. A fit that is too good might result in overfitting and in a poorer classifier.
Version History
API Version
3.3
See Also
ENVITrainClassifierTask, ENVIExamples, ENVISoftmaxRegressionClassifier, ENVISVMClassifier