>  Docs Center  >  ENVI API  >  Classification Framework  >  ENVIExamples

ENVIExamples

ENVIExamples

This is a reference to an ENVIExamples object, which contains examples and class values used as input to the training method of a classification trainer and to evaluate the performance of a classifier.

See the Prepare Data for Classification topic for definitions of examples and class values.

Example


See the following topics for code examples:

Syntax


Result = ENVIExamples ([, Properties=value] [, Keywords=value])

Return Value


This function returns a reference to an ENVIExamples object.

Methods


Dehydrate

GetParameters

GetProperties

Hydrate

Save

SetExampleData

Properties


ATTRIBUTE_NAMES (Get)

A string array of attribute names.

CLASS_NAMES (Get, Set)

A string array of unique class names.

CLASS_VALUES (Get)

An integer array of numbers assigned to each unique class. The array size is equal to the number of EXAMPLES.

DESCRIPTION (Get, Set)

A string with a description of the examples array.

EXAMPLES (Get)

An array of size n x m, where n is the number of examples and m is the number of attributes.

NATTRIBUTES (Get)

The number of attributes.

NCLASSES (Get)

The number of classes.

NCLASS_VALUES (Get)

The number of class values.

NEXAMPLES (Get)

The number of examples.

Keywords


ATTRIBUTE_NAMES (optional)

Set this keyword to a string array of attribute names.

CLASS_NAMES (optional)

Set this keyword to a string array of unique class names.

CLASS_VALUES (optional)

Set this keyword to an integer array of numbers assigned to each unique class. The array size is equal to the number of EXAMPLES.

DESCRIPTION (optional)

Set this keyword to a string with a description of the examples array.

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.

EXAMPLES (optional)

Set this keyword to an array of size n x m, where n is the number of examples and m is the number of attributes.

PROPERTIES (optional)

Rather than setting each property with individual keywords when initializing the ENVIExamples object, you can optionally set the PROPERTIES keyword to an IDL dictionary that contains previously defined properties for ENVIExamples. For example:

properties = Dictionary()
properties['EXAMPLES'] = myExamples
properties['CLASS_VALUES'] = myClassValues
properties['CLASS_NAMES'] = myClassNames
properties['ATTRIBUTE_NAMES'] = myAttributeNames
properties['DESCRIPTION'] = myDescription
 
examples = ENVIExamples(PROPERTIES=properties)

In this example, myExamples, myClassValues, myClassNames, myAttributeNames, and myDescription are previously defined variables.

URI (optional)

Set this keyword to a string with the fully qualified filename and path of the output object. If you specify a URI, the Save method will use that URI. You can restore the object later using ENVIRestoreObject.

Version History


ENVI 5.4

Introduced

API Version


3.3

See Also


ENVIExtractExamplesFromRaster, Prepare Data for Classification



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