SAGA 9.6.1 | Tool Library Documentation

Decision Tree Classification


Description

Integration of the OpenCV Machine Learning library for Decision Tree classification of gridded features.


References


Parameters

 NameTypeIdentifierDescriptionConstraints
InputFeaturesgrid list, inputFEATURES--
Training Samplestable, inputTRAIN_SAMPLESProvide a class identifier in the first field followed by sample data corresponding to the input feature grids.-
Training Areasshapes, inputTRAIN_AREAS--
OutputClassificationgrid, outputCLASSES--
Look-up Tabletable, output, optionalCLASSES_LUTA reference list of the grid values that have been assigned to the training classes.-
OptionsNormalizebooleanNORMALIZE-Default: 0
Colors from Featuresboolean [GUI]RGB_COLORSUse the first three features in list to obtain blue, green, red components for class colour in look-up table.Default: 0
Grid Systemgrid systemGRID_SYSTEM--
TrainingchoiceMODEL_TRAIN-Available Choices: [0] training areas [1] training samples [2] load from file Default: 0
Class Identifiertable fieldTRAIN_CLASS--
Buffer Sizefloating point numberTRAIN_BUFFERFor non-polygon type training areas, creates a buffer with a diameter of specified size.Minimum: 0.000000 Default: 1.000000
Load Modelfile pathMODEL_LOADUse a model previously stored to file.-
Save Modelfile pathMODEL_SAVEStores model to file to be used for subsequent classifications instead of training areas.-
Maximum Tree Depthinteger numberMAX_DEPTHThe maximum possible depth of the tree. That is the training algorithms attempts to split a node while its depth is less than maxDepth. The root node has zero depth.Minimum: 1 Default: 10
Minimum Sample Countinteger numberMIN_SAMPLESIf the number of samples in a node is less than this parameter then the node will not be split.Minimum: 2 Default: 2
Maximum Categoriesinteger numberMAX_CATEGRSCluster possible values of a categorical variable into K<=maxCategories clusters to find a suboptimal split.Minimum: 1 Default: 10
Use 1SE Ruleboolean1SE_RULEIf true then a pruning will be harsher. This will make a tree more compact and more resistant to the training data noise but a bit less accurate.Default: 1
Truncate Pruned TreesbooleanTRUNC_PRUNEDIf true then pruned branches are physically removed from the tree. Otherwise they are retained and it is possible to get results from the original unpruned (or pruned less aggressively) tree.Default: 1
Regression Accuracyfloating point numberREG_ACCURACYTermination criteria for regression trees. If all absolute differences between an estimated value in a node and values of train samples in this node are less than this parameter then the node will not be split further.Minimum: 0.000000 Default: 0.010000

Command Line


Usage: saga_cmd imagery_opencv 8 [-FEATURES ] [-NORMALIZE ] [-CLASSES ] [-CLASSES_LUT ] [-MODEL_TRAIN ] [-TRAIN_SAMPLES ] [-TRAIN_AREAS ] [-TRAIN_CLASS ] [-TRAIN_BUFFER ] [-MODEL_LOAD ] [-MODEL_SAVE ] [-MAX_DEPTH ] [-MIN_SAMPLES ] [-MAX_CATEGRS ] [-1SE_RULE ] [-TRUNC_PRUNED ] [-REG_ACCURACY ]
  -FEATURES:       	Features
	grid list, input
  -NORMALIZE:      	Normalize
	boolean
	Default: 0
  -CLASSES:        	Classification
	grid, output
  -CLASSES_LUT:    	Look-up Table
	table, output, optional
  -MODEL_TRAIN:    	Training
	choice
	Available Choices:
	[0] training areas
	[1] training samples
	[2] load from file
	Default: 0
  -TRAIN_SAMPLES:  	Training Samples
	table, input
  -TRAIN_AREAS:    	Training Areas
	shapes, input
  -TRAIN_CLASS:    	Class Identifier
	table field
  -TRAIN_BUFFER:	Buffer Size
	floating point number
	Minimum: 0.000000
	Default: 1.000000
  -MODEL_LOAD:     	Load Model
	file path
  -MODEL_SAVE:     	Save Model
	file path
  -MAX_DEPTH:      	Maximum Tree Depth
	integer number
	Minimum: 1
	Default: 10
  -MIN_SAMPLES:    	Minimum Sample Count
	integer number
	Minimum: 2
	Default: 2
  -MAX_CATEGRS:    	Maximum Categories
	integer number
	Minimum: 1
	Default: 10
  -1SE_RULE:       	Use 1SE Rule
	boolean
	Default: 1
  -TRUNC_PRUNED:   	Truncate Pruned Trees
	boolean
	Default: 1
  -REG_ACCURACY:	Regression Accuracy
	floating point number
	Minimum: 0.000000
	Default: 0.010000