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


  >  Docs Center  >  ENVI API  >  Classification Framework  >  ENVIApplyGainOffsetToExamples

ENVIApplyGainOffsetToExamples

ENVIApplyGainOffsetToExamples

This function 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 shows the typical workflows where this function is used:

 

Example


See the following topics for examples:

Syntax


Result = ENVIApplyGainOffsetToExamples(Input_Examples [, Keywords=value])

Return Value


This function returns a reference to a normalized ENVIExamples object.

Arguments


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.

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_GAIN (optional)

Set this keyword to a named variable to receive 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. See Normalize Examples for more information.

OUTPUT_OFFSET (optional)

Set this keyword to a named variable to receive an array of offset 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 offset to the raster that you will classify. See Normalize Examples for more information.

Version History


ENVI 5.4

Introduced

API Version


3.3

See Also


ENVISoftmaxRegressionClassifier, ENVIApplyGainOffsetToExamplesTask, ENVIExamples



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