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


  >  Docs Center  >  ENVI API  >  Classification Framework  >  ENVISVMClassifier

ENVISVMClassifier

ENVISVMClassifier

This function classifies a dataset using a Support Vector Machine (SVM) classifier. See Support Vector Machine Background for details on this algorithm.

Use the ENVIIterativeTrainer object with an SVM classifier. Set the MAXIMUM_ITERATIONS keyword to 1 in that object. In general, ENVI classifiers are updated by a trainer over a number of iterations. ENVISVMClassifier, however, calls a previously existing algorithm that performs its own iterative loop. Setting the MAXIMUM_ITERATIONS keyword to 1 prevents the trainer from performing a redundant second iteration.

The following diagram shows a typical workflow where the SVM classifier is used:

 

Note: SVM classification can take several hours to complete with training data that uses large regions of interest (ROIs).

Example


See Code Example: Support Vector Machine Classification Using API Objects.

Syntax


Result = ENVISVMClassifier([, Keywords=value])

Return Value


This function returns a reference to an ENVISVMClassifier object.

Arguments


None

Methods


Classify

Dehydrate

GetParameters

GetProperties

Hydrate

Save

Keywords


CLASS_NAMES (optional)

Set this keyword to a string array with the class names.

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.

KERNEL_BIAS (optional)

Set this keyword to a bias term when KERNEL_TYPE is set to Polynomial or Sigmoid. The default value is 1.0.

KERNEL_DEGREE (optional)

Set this keyword to a value greater than or equal to 1, indicating the degree of the polynomial when KERNEL_TYPE is set to Polynomial. The default value is 2.

KERNEL_GAMMA (optional)

Set this keyword to a gamma term when KERNEL_TYPE is set to Polynomial, Radial Basis Function, or Sigmoid. The default value is 1 / NATTRIBUTES, but the optimal value for any particular classifier is highly variable and will likely need to be adjusted. You should perform a grid search for parameter selection as described in Hsu, Chang, and Lin (2010).

KERNEL_TYPE (optional)

Set this keyword to one of the following strings to indicate the kernel type:

  • Linear
  • Polynomial
  • Radial Basis Function (default)
  • Sigmoid

NATTRIBUTES (required)

Set this keyword to the number of attributes that the input data will be required to have.

NCLASSES (required)

Set this keyword to the number of unique classes that the classifier will have.

PENALTY (optional)

Set this keyword to a value indicating the penalty parameter. The default value is 100.0. The optimal value for any particular classifier is highly variable and will most likely need to be adjusted. You should perform a grid search for parameter selection as described in Hsu, Chang, and Lin (2010).

PROPERTIES (optional)

Set this keyword to an IDL dictionary containing the following properties.

  • Class_Names: Optional. Specify a string array with the class names.
  • Kernel_Bias: Optional. Specify a bias term when Kernel_Type is set to Polynomial or Sigmoid. The default value is 1.0.
  • Kernel_Degree: Optional. Specify a value greater than or equal to 1, indicating the degree of the polynomial when Kernel_Type is set to Polynomial. The default value is 2.
  • Kernel_Gamma: Optional. Specify a gamma term when Kernel_Type is set to Polynomial, Radial Basis Function, or Sigmoid. The default value is 1/NAttributes.
  • Kernel_Type: Optional. Specify a string indicating the kernel type. The options are Linear, Polynomial, Radial Basis Function, or Sigmoid.
  • NAttributes: Required. Specify the the number of attributes that the input data will be required to have.
  • NClasses: Required. Specify the number of unique classes that the classifier will have.
  • Penalty: Optional. Specify a value indicating the penalty parameter. The default value is 100.0.

Here is an example of a dictionary:

Properties = Dictionary()
Properties.NAttributes = 6
Properties.NClasses = 5
Properties.Class_Names = ['Asphalt', 'Concrete', 'Grass', 'Tree', 'Building']

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.2

See Also


ENVICreateSVMClassifierTask, ENVISoftmaxRegressionClassifier



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