mSpacingEntropy: Entropy estimation using m-spacing

Description Usage Arguments Value Author(s) References Examples

View source: R/entropy.R

Description

Calculates entropy using m-spacing.

Usage

1

Arguments

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

Value

Vector of real numbers corresponding to the approximate entropy for each row of input x.

Author(s)

Paul Smith \& Jochen Voss, mmpws@leeds.ac.uk

References

Beirlant, Jan, et al. "Nonparametric entropy estimation: An overview."

Examples

 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)

pws3141/clusterICA documentation built on July 14, 2020, 5:04 a.m.