Utility Functions

DiscreteEntropy.logxFunction
logx(x)::Float64

Returns natural logarithm of x, or 0.0 if x is zero

DiscreteEntropy.marginal_countsFunction
marginal_counts(contingency_matrix::Matrix, dim; normalise=false)

Return the marginal counts of contingency_matrix along dimension dim.

If normalised = true, return as probability distribution.

DiscreteEntropy.from_csvFunction
from_csv(file::String, field, ::Type{T}; remove_zeros=false, header=nothing) where {T<:EntropyData}

Simple wrapper around *CSV.File() which returns a CountData object. For more complex requirements, it is best to call CSV directly.

Non-exported functions

DiscreteEntropy.xFxFunction
 xFx(f::Function, x)

Returns x * f(x) for x > 0, or 0.0 if x is zero