Welcome to the Harris Geospatial documentation center. Here you will find reference guides and help documents.


  >  Docs Center  >  ENVI API  >  Classification Framework  >  ENVIApplyGainOffsetToExamplesTask

ENVIApplyGainOffsetToExamplesTask

ENVIApplyGainOffsetToExamplesTask

This task applies a gain and offset to the examples in an ENVIExamples object. Its purpose is to get the data into a consistent range of values prior to classification. This normalization is particularly important for ENVISoftmaxRegressionClassifier, which is sensitive to widely varying data ranges between attributes. The output examples are calculated as follows:

The following diagrams show the typical workflows where this task is used:

 

Example


See Code Example: Softmax Regression Classification Using ENVITasks.

Syntax


Result = ENVITask('ApplyGainOffsetToExamples')

Input properties (Set, Get): INPUT_EXAMPLES, INPUT_GAIN, INPUT_OFFSET, OUTPUT_EXAMPLES_URI

Output properties (Get only): OUTPUT_EXAMPLES, OUTPUT_GAIN, OUTPUT_OFFSET

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:

INPUT_EXAMPLES (required)

This is a reference to the input ENVIExamples object.

INPUT_GAIN (optional)

Specify an array of gain values, one for each attribute in INPUT_EXAMPLES. If you do not specify any values, a default gain for each attribute is used:

Where is the maximum example value and is the minimum example value for attribute i.

INPUT_OFFSET (optional)

Specify an array of offset values, one for each attribute in INPUT_EXAMPLES. If you do not specify any values, a default offset for each attribute is used:

Where is the mean of all example values for attribute i.

OUTPUT_EXAMPLES (required)

This is a reference to the output ENVIExamples object.

OUTPUT_EXAMPLES_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.ENVIExamples is a persistable object that can be saved and restored.

OUTPUT_GAIN (optional)

This is an array of gain values applied to the examples. The number of elements in this array will be equal to the number of attributes. Use this keyword if you need to apply the same gain to the raster that you will classify.

OUTPUT_OFFSET (optional)

This is an array of offsets applied to the examples. The number of elements in this array will be equal to the number of attributes. Use this keyword if you need to apply the same offset to the raster that you will classify.

Version History


ENVI 5.4

Introduced

API Version


3.3

See Also


ENVITask, ENVIApplyGainOffsetToExamples, ENVIExamples, ENVIRestoreObject



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us