mesa.ecospatial.calculate_shannon_entropy

mesa.ecospatial.calculate_shannon_entropy(counts)

Calculate the Shannon entropy of a set of counts.

Parameters:

counts (numpy.ndarray) – An array of counts from which to calculate the entropy. Each count represents the frequency of a distinct event in the dataset.

Returns:

The Shannon entropy calculated from the counts.

Return type:

float