Calculates 2D entropy.
entropy_2d(data, bw, grid_size, relative = FALSE, add_max = FALSE)
entropy value
data.frame with two columns for x and y coordinates.
Bandwidth to use in 2D kernel density estimator.
Size of binning grid, in the unit of the data.
Logical. Rescale entropy relative to the maximum entropy given the number of grid cells? Defaults to FALSE.
Logical. Add the maximum entropy as a return?
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.
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)
Run the code above in your browser using DataLab