Closed sbulcsu closed 1 month ago
Since bit_number_measures
only depend on the stationary distribution x
, maybe it would make more sense to get rid of P
entirely:
function bit_number_measures(x::Vector{Float64})
l = -log.(x)
replace!(l, Inf=>0.0)
entropy = sum((x .* l)) #C1
variance = sum(x .* l .* l) - entropy^2 #C2
return real(entropy), real(variance), :Success
end
If x
is not readily available, one can use bit_number_measures( stationary_distribution(P) )
It should be possible to provide a stationary distribution, something like this:
function bit_number_measures(P::AbstractMatrix; x=nothing)