Description Usage Arguments Value Author(s) References Examples
Calculates entropy using m-spacing.
1 | mSpacingEntropy(x, m)
|
x |
the data, either a vector or matrix. If x is a matrix, entropy is estimated for each row separately. |
m |
(optional) the m-spacing. Defaults to m <- sqrt(n) if missing, where n is length(x) if x is a vector, or ncol(x) if a matrix |
Vector of real numbers corresponding to the approximate entropy for each row of input x.
Paul Smith \& Jochen Voss, mmpws@leeds.ac.uk
Beirlant, Jan, et al. "Nonparametric entropy estimation: An overview."
1 2 3 4 5 6 7 8 9 10 11 12 | X1 <- matrix(rnorm(150), ncol=15, nrow=10)
X2 <- matrix(rnorm(150), ncol=10, nrow=15)
X3 <- matrix(rnorm(1500), ncol=10, nrow=150)
X4 <- matrix(rnorm(1500), ncol=100, nrow=15)
X <- list(X1, X2, X3, X4)
XiEntr <- vector("list", length = length(X))
for (i in 1:length(X)) {
Xi <- X[[i]]
XiEntr_mat <- mSpacingEntropy(Xi)
XiEntr[[i]] <- XiEntr_mat
}
str(XiEntr)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.