Calculate Shannon entropy

shannon_entropy(cluster_assignments)

Arguments

cluster_assignments

A vector with cluster assignments

Value

The Shannon entropy of the assignment vector