entropy_2d {habtools} | R Documentation |
2D Entropy
Description
Calculates 2D entropy.
Usage
entropy_2d(data, bw, grid_size, relative = FALSE, add_max = FALSE)
Arguments
data |
data.frame with two columns for x and y coordinates. |
bw |
Bandwidth to use in 2D kernel density estimator. |
grid_size |
Size of binning grid, in the unit of the data. |
relative |
Logical. Rescale entropy relative to the maximum entropy given the number of grid cells? Defaults to FALSE. |
add_max |
Logical. Add the maximum entropy as a return? |
Value
entropy value
References
X. Liu, Q. Ma, X. Wu, T. Hu, Z. Liu, L. Liu, Q. Guo, Y. Su (2022). A novel entropy-based method to quantify forest canopy structural complexity from multiplatform lidar point clouds. Remote Sens. Environ. 282, 113280.
Examples
dta <- data.frame(x = rnorm(100,5,1), y = rnorm(100,5,1))
entropy_2d(dta, bw = 0.5, 0.25)
entropy_2d(dta, bw = 0.5, 0.25, relative = TRUE)
dta <- data.frame(x = runif(100, 1,10), y = runif(100, 1,10))
entropy_2d(dta, bw = 0.5, 0.25)
entropy_2d(dta, bw = 0.5, 0.25, relative = TRUE)
[Package habtools version 1.1.1 Index]