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 in nats of Shannon entropy of data
using estimator
.
Example
julia> import Random; Random.seed!(1);
julia> X = rand(1:10, 1000)
julia> estimate_h(from_data(X, Samples), Schurmann)
2.3039615201251173
Note
While most calls to estimate_h take a CountData struct, this is not true for every estimator, especially those that work directly over samples, or need the original structure of the histogram.
For a complete list of methods of the function, try
julia> methods(estimate_h)
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.