Estimate the entropy of a vector using either category counts (for discrete data) or a k-nearest neighbor estimator (for continuous data).
Arguments
- vec
A vector.
- base
(optional) Logarithm base of the entropy. Defaults to
exp(1)(nats). Use2for bits or10for dits.- type
(optional) Estimation method:
"disc"for discrete entropy or"cont"for continuous entropy (KSG estimator).- k
(optional) Number of nearest neighbors used by the continuous estimator. Ignored when
type = "disc".