Diversity {StrucDiv}R Documentation

Spatial Structural Diversity Metrics

Description

The functions entropy , entropyNorm, contrast, dissimilarity and homogeneity are the (spatial) structural diversity metrics used in the default configurations of strucDiv and strucDivNest. Structural diversity entropy is entropy with different delta parameters. Shannon entropy is employed, when delta = 0. Shannon entropy has a window-dependent maximum when strucDiv is used, which may be violated when strucDivNest is used, depending on the posterior probabilities of pixel value co-occurrences. Additionally, the value gradient is considered when delta = 1 or delta = 2. The values of structural diversity entropy with delta = 1 or delta = 2 are not restricted and depend on the values of the input raster. the metric entropyNorm is Shannon entropy normalized over maximum entropy, which depends on the size of the moving window when no nesting is used. The metric entropyNorm ranges between 0 and 1, when strucDiv is used, but may be larger than 1 when strucDivNest is used, depending on the posterior probabilities of pixel value co-occurrences. The metrics contrast and dissimilarity consider the value gradient, their values are not restricted and depend on the values of the input raster. The metric homogeneity quantifies the closeness of empirical probabilities to the diagonal and ranges between 0 and 1 when strucDiv is used, but may be larger than 1 when strucDivNest is used, depending on the posterior probabilities of pixel value co-occurrences.

Usage

homogeneity(
  rank,
  delta,
  Hetx,
  vMat_big = NULL,
  SpatMat,
  nrp,
  narm,
  display_progress = TRUE,
  ...
)

dissimilarity(
  rank,
  delta,
  Hetx,
  vMat_big = NULL,
  SpatMat,
  nrp,
  narm,
  display_progress,
  ...
)

contrast(
  rank,
  delta,
  Hetx,
  vMat_big = NULL,
  SpatMat,
  nrp,
  narm,
  display_progress,
  ...
)

entropy(
  rank,
  delta,
  Hetx,
  vMat_big = NULL,
  SpatMat,
  nrp,
  narm,
  display_progress,
  ...
)

entropyNorm(
  rank,
  delta,
  Hetx,
  vMat_big = NULL,
  SpatMat,
  nrp,
  narm,
  display_progress,
  ...
)

Arguments

rank

logical. Should values be replaced with ranks in each co-occurrence matrix (GLCM)? Defaults to FALSE.

delta

numeric, takes 3 options: 0, 1, or 2. The delta parameter defines how the differences between pixel values within a pixel pair are weighted. If rank = TRUE, delta defines how the differences between ranks are weighted. The default value is 0 (no weight). Set delta = 1 for absolute weights, or delta = 2 for squared weights. The delta parameter can only be set when the metric entropy is used. The metric dissimilarity automatically employs delta = 1, and contrast employs delta = 2.

Hetx

the structural diversity matrix that is returned by an internal function to the strucDiv and strucDivNest functions. The structural diversity metric is calculated on every element of the GLCM, which generates the structural diversity matrix Hetx. The sum of this matrix is assigned to the center pixel of the moving window.

vMat_big

matrix. The matrix containing the pixel values of the outer scale. Defaults to NULL, in which case no prior information is used.

SpatMat

the GLCM that is returned by an internal function to the strucDiv and strucDivNest functions.

nrp

integer. The total number of pixel pairs. nrp is calculated internally by the functions strucDiv and strucDivNest and passed to the structural diversity metric functions.

narm

logical. Should NAs be removed? narm is automatically set to 0 if na.handling = na.pass, and to 1 if na.handling = na.omit.

display_progress

logical. Should a progress bar be displayed?

...

possible further arguments.

Details

These functions are used internally and are called as an argument to the strucDiv and strucDivNest functions.


[Package StrucDiv version 0.2.1 Index]