wavefunctioncollapse icon indicating copy to clipboard operation
wavefunctioncollapse copied to clipboard

ModuleSet.calculateEntropy()

Open small-pineapple opened this issue 1 year ago • 2 comments

It's return is "-1f / total * entropySum + Mathf.Log(total);" What does this mean? Normalization? The final effect will be better if just use "-1f * entropySum" or "entropySum", the result generated by normalized version is too flat in height

small-pineapple avatar Dec 23 '24 11:12 small-pineapple

This formula for entropy is a bit counter intuitive, but it can be derived like this:

image

That being said, you don't have to use entropy, if you get better looking results with a different formula, that's great!

marian42 avatar Jan 08 '25 21:01 marian42

So ModulePrototype.Probability is relative probability or weight. However, the entropy value is dominated by the size of p (ModuleSet.Count), those entropies should have been normalized before compare.

small-pineapple avatar Jan 10 '25 07:01 small-pineapple