Calculates three metrics to evaluate quality of spatial patterns' clustering or segmentation. When the type is "cluster", then metrics of inhomogeneity, distinction, and quality are calculated. When the type is "segmentation", then metrics of inhomogeneity, isolation, and quality are calculated. For more information, see Details below.

lsp_add_quality(x, x_dist, type = "cluster", regions = FALSE)

Arguments

x

Object of class sf - usually the output of the lsp_add_clusters() function

x_dist

Object of class dist - usually the output of the lsp_to_dist() function

type

Either "cluster" or "segmentation"

regions

Not implemented yet

Value

Object of class sf with three additional columns representing quality metrics.

Details

For type "cluster", this function calculates three quality metrics to evaluate spatial patterns' clustering: (1) inhomogeneity - it measures a degree of mutual dissimilarity between all objects in a cluster. This value is between 0 and 1, where small value indicates that all objects in the cluster represent consistent patterns so the cluster is pattern-homogeneous. (2) distinction - it is an average distance between the focus cluster and all of the other clusters. This value is between 0 and 1, where large value indicates that the cluster stands out from the other clusters. (3) quality - overall quality of a cluster. It is calculated as 1 - (inhomogeneity / distinction). This value is also between 0 and 1, where increased values indicate increased quality.

For type "segmentation", this function calculates three quality metrics to evaluate spatial patterns' segmentation: (1) inhomogeneity - it measures a degree of mutual dissimilarity between all objects in a cluster. This value is between 0 and 1, where small value indicates that all objects in the cluster represent consistent patterns so the cluster is pattern-homogeneous. (2) isolation - it is an average distance between the focus cluster and all of its neighbors. This value is between 0 and 1, where large value indicates that the cluster stands out from its surroundings. (3) quality - overall quality of a cluster. It is calculated as 1 - (inhomogeneity / distinction). This value is also between 0 and 1, where increased values indicate increased quality.

References

Jakub Nowosad & Tomasz F. Stepinski (2021) Pattern-based identification and mapping of landscape types using multi-thematic data, International Journal of Geographical Information Science, DOI: 10.1080/13658816.2021.1893324

See also

lsp_add_clusters

Examples

# see examples of `lsp_add_clusters()`