Open refi64 opened 8 months ago
Describe the bug If I pass unsigned numbers to complexity_normalized(SampleEntropy), the resulting entropy is negative.
complexity_normalized(SampleEntropy)
Minimal Working Example
A few examples:
julia> entropy_sample(rand(UInt32,6000)) -0.0020435533500534255 julia> entropy_sample(rand(UInt32,6000), normalize = false) -0.02297010297324151
vs when using signed ints:
julia> entropy_sample(rand(Int32,6000)) 0.022439025318529444 julia> entropy_sample(rand(Int32,6000), normalize = false) 0.3244738161894723
I'm not really an expert here so I'm not sure if the non-normalized entropy can be negative, but I'm quite sure the normalized one shouldn't be negative given that it should be in [0,1]?
[0,1]
Package versions
[ab4b797d] ComplexityMeasures v2.8.0
Describe the bug If I pass unsigned numbers to
complexity_normalized(SampleEntropy)
, the resulting entropy is negative.Minimal Working Example
A few examples:
vs when using signed ints:
I'm not really an expert here so I'm not sure if the non-normalized entropy can be negative, but I'm quite sure the normalized one shouldn't be negative given that it should be in
[0,1]
?Package versions