SAGA-GIS Tool Library Documentation (v7.3.0)

Tool Focal PCA on a Grid

This tool uses the difference in cell values of a center cell and its neighbours (as specified by the kernel) as features for a Principal Component Analysis (PCA). This method has been used by Thomas and Herzfeld (2004) to parameterize the topography for a subsequent regionalization of climate variables with the principal components as predictors in a regression model.


References


Parameters

 NameTypeIdentifierDescriptionConstraints
InputGridGrid (input)GRID--
OutputBase Topographies (*)Grid list (optional output)BASE--
Principal ComponentsGrid list (output)PCA--
Eigen Vectors (*)Table (optional output)EIGEN--
OptionsGrid systemGrid systemPARAMETERS_GRID_SYSTEM--
Number of ComponentsIntegerCOMPONENTSnumber of first components in the output; set to zero to get allMinimum: 1
Default: 7
Output of Base TopographiesBooleanBASE_OUT-Default: 0
Overwrite Previous ResultsBooleanOVERWRITE-Default: 1
Kernel TypeChoiceKERNEL_TYPE-Available Choices:
[0] Square
[1] Circle
Default: 1
Kernel RadiusIntegerKERNEL_RADIUSKernel radius in cells.Minimum: 1
Default: 2
MethodChoiceMETHOD-Available Choices:
[0] correlation matrix
[1] variance-covariance matrix
[2] sums-of-squares-and-cross-products matrix
Default: 1
(*) optional

Command-line

Usage: saga_cmd statistics_grid 15 [-GRID <str>] [-BASE <str>] [-PCA <str>] [-EIGEN <str>] [-COMPONENTS <num>] [-BASE_OUT <str>] [-OVERWRITE <str>] [-KERNEL_TYPE <str>] [-KERNEL_RADIUS <num>] [-METHOD <str>]
  -GRID:<str>         	Grid
	Grid (input)
  -BASE:<str>         	Base Topographies
	Grid list (optional output)
  -PCA:<str>          	Principal Components
	Grid list (output)
  -EIGEN:<str>        	Eigen Vectors
	Table (optional output)
  -COMPONENTS:<num>   	Number of Components
	Integer
	Minimum: 1
	Default: 7
  -BASE_OUT:<str>     	Output of Base Topographies
	Boolean
	Default: 0
  -OVERWRITE:<str>    	Overwrite Previous Results
	Boolean
	Default: 1
  -KERNEL_TYPE:<str>  	Kernel Type
	Choice
	Available Choices:
	[0] Square
	[1] Circle
	Default: 1
  -KERNEL_RADIUS:<num>	Kernel Radius
	Integer
	Minimum: 1
	Default: 2
  -METHOD:<str>       	Method
	Choice
	Available Choices:
	[0] correlation matrix
	[1] variance-covariance matrix
	[2] sums-of-squares-and-cross-products matrix
	Default: 1