Estimate_H
The main entry point for the library.
DiscreteEntropy.estimate_h — Functionestimate_h(data::CountData, estimator::Type{T}) where {T<:AbstractEstimator}
estimate_h(data::CountData, ::Type{JackknifeMLE}; corrected=false)
estimate_h(data::CountData, ::Type{Schurmann}, xi=nothing)
estimate_h(data::CountVector, ::Type{SchurmannGeneralised}, xis::XiVector)
estimate_h(data::CountData, ::Type{Bayes}, α::AbstractFloat; K=nothing)
estimate_h(data::CountData, ::Type{NSB}; guess=false, K=nothing)Return the estimate of Shannon entropy of data, in nats, using estimator.
Example
julia> import Random; Random.seed!(1);
julia> X = rand(1:10, 1000)
julia> estimate_h(from_data(X, Samples), Schurmann)
2.3039615201251173Note
While most calls to estimate_h take a CountData struct, this is not true for every estimator. In particular schurmann_generalised has a different method call
estimate_h(data::CountVector, ::Type{SchurmannGeneralised}, xis::XiVector)as this works directly over this sample histogram.
For a complete list of methods of the function, try
julia> methods(estimate_h)Return the estimate of Shannon entropy of data, in nats, using estimator.
This function is a wrapper indended to make using the libary easier. For finer control over some of the estimators, it is advisable to call them directly, rather than through this function.