Wrong entropy calculations
krychu opened this issue · comments
krychu commented
- Entropy calculations should involve probabilities, not rough frequencies. These values are passed to
log
which gives different sign for probabilities (<1) and frequencies (>1). - I don't see how equations in the original implementation relate to entropy, use Shannon formulation instead.
- Current implementation runs into rounding issues due to the use of
int
instead ofdouble
.
All in all this impacts the selection of the next cell to collapse. With the fix the frequencies of tiles in the output image should match that of the input image.