SAGA 9.4.2 | Tool Library Documentation

Logistic Regression Classification


Description

Integration of the OpenCV Machine Learning library for Logistic Regression based classification of gridded features. Optimization algorithms like Batch Gradient Descent and Mini-Batch Gradient Descent are supported in Logistic Regression. It is important that we mention the number of iterations these optimization algorithms have to run. The number of iterations can be thought as number of steps taken and learning rate specifies if it is a long step or a short step. This and previous parameter define how fast we arrive at a possible solution. In order to compensate for overfitting regularization can be performed. (L1 or L2 norm). Logistic regression implementation provides a choice of two training methods with Batch Gradient Descent or the Mini-Batch Gradient Descent.


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, GUIRGB_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.-
Learning Ratefloating point numberLOGR_LEARNING_RATEThe learning rate determines how fast we approach the solution.Minimum: 0.000000 Default: 1.000000
Number of Iterationsinteger numberLOGR_ITERATIONS-Minimum: 1 Default: 300
RegularizationchoiceLOGR_REGULARIZATION-Available Choices: [0] disabled [1] L1 norm [2] L2 norm Default: 0
Training MethodchoiceLOGR_TRAIN_METHOD-Available Choices: [0] Batch Gradient Descent [1] Mini-Batch Gradient Descent Default: 0
Mini-Batch Sizeinteger numberLOGR_MINIBATCH_SIZE-Minimum: 1 Default: 1

Command Line


Usage: saga_cmd imagery_opencv 12 [-FEATURES ] [-NORMALIZE ] [-CLASSES ] [-CLASSES_LUT ] [-MODEL_TRAIN ] [-TRAIN_SAMPLES ] [-TRAIN_AREAS ] [-TRAIN_CLASS ] [-TRAIN_BUFFER ] [-MODEL_LOAD ] [-MODEL_SAVE ] [-LOGR_LEARNING_RATE ] [-LOGR_ITERATIONS ] [-LOGR_REGULARIZATION ] [-LOGR_TRAIN_METHOD ] [-LOGR_MINIBATCH_SIZE ]
  -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
  -LOGR_LEARNING_RATE:	Learning Rate
	floating point number
	Minimum: 0.000000
	Default: 1.000000
  -LOGR_ITERATIONS:      	Number of Iterations
	integer number
	Minimum: 1
	Default: 300
  -LOGR_REGULARIZATION:  	Regularization
	choice
	Available Choices:
	[0] disabled
	[1] L1 norm
	[2] L2 norm
	Default: 0
  -LOGR_TRAIN_METHOD:    	Training Method
	choice
	Available Choices:
	[0] Batch Gradient Descent
	[1] Mini-Batch Gradient Descent
	Default: 0
  -LOGR_MINIBATCH_SIZE:  	Mini-Batch Size
	integer number
	Minimum: 1
	Default: 1