Learn R Programming

comat (version 0.9.5)

it_metric: Calculates an Information Theory-based metric

Description

Calculates a selected Information Theory-based metric based on a provided co-occurrence matrix

Usage

it_metric(x, metric, base = "log2", ordered = TRUE)

Value

A single numeric value

Arguments

x

A matrix - an output of the get_coma() function

metric

One of the following: "ent" (Marginal entropy), "joinent" (Joint entropy), "condent" (Conditional entropy), "mutinf" (Mutual information), or "relmutinf" (Relative mutual information)

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

ordered

The type of pairs considered. Either "ordered" (TRUE) or "unordered" (FALSE). The default is TRUE.

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

Examples

Run this code
library(comat)
data(raster_x, package = "comat")

com = get_coma(raster_x)
com

it_metric(com, metric = "ent")
it_metric(com, metric = "joinent")
it_metric(com, metric = "condent")
it_metric(com, metric = "mutinf")
it_metric(com, metric = "relmutinf")

Run the code above in your browser using DataLab