ENVICreateGradientDescentTrainerTask
This task creates a Gradient Descent trainer that can train a classifier using ENVITrainClassifierTask.
The trainer uses a Gradient Descent algorithm to train a classifier that reports a gradient; for example, Softmax Regression. The Gradient Descent algorithm iteratively updates the weights of a classifier until the classifier's change in loss falls below a specified convergence criterion or it reaches a specified maximum number of iterations. The weights are updated according to the gradient of the current state of the classifier, using the following formula:
The learning rate, convergence criterion, and maximum iterations needed to effectively train a classifier (not just each classifier type, but each classifier instance) can vary considerably. They often take some experimentation to determine.
The following diagram shows a typical workflow where this task is used:
Example
See Code Example: Softmax Regression Classification Using ENVITasks.
Syntax
Result = ENVITask('CreateGradientDescentTrainer')
Input properties (Set, Get): CONVERGENCE_CRITERION, LEARNING_RATE, MAXIMUM_ITERATIONS, OUTPUT_TRAINER_URI
Output properties (Get only): OUTPUT_TRAINER
Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.
Methods
This task inherits the following methods from ENVITask:
AddParameter
Execute
Parameter
ParameterNames
RemoveParameter
Properties
This task inherits the following properties from ENVITask:
COMMUTE_ON_DOWNSAMPLE
COMMUTE_ON_SUBSET
DESCRIPTION
DISPLAY_NAME
NAME
REVISION
TAGS
This task also contains the following properties:
CONVERGENCE_CRITERION (optional)
Specify a convergence criterion. Ideally, with each iteration, the change in loss value decreases until it meets a specified threshold, below which iterations can stop. This threshold is the convergence criterion. The default value is 0.001.
LEARNING_RATE (optional)
Specify the step size to use for updating the classifier weights. The default value is 0.1.
MAXIMUM_ITERATIONS (optional)
Specify the maximum number of iterations to perform if the convergence criterion is not met. The default value is 100.
OUTPUT_TRAINER
This is a reference to the initialized ENVIGradientDescentTrainer object.
OUTPUT_TRAINER_URI (optional)
Specify a string with the fully qualified filename and path of the output object. If you do not specify this property, the output object (.epo) is only temporary. Once ENVI is closed, it deletes the temporary file. Restore the object later using ENVIRestoreObject.ENVIGradientDescentTrainer is a persistable object that can be saved and restored later.
Version History
API Version
3.3
See Also
ENVITask, ENVIGradientDescentTrainer, ENVICreateIterativeTrainerTask, ENVITrainClassifierTask, ENVIRestoreObject