Entropy measures the purity of the clusters class labels.
Thus, if all clusters consist of objects with only a single class
label, the entropy is 0. However, as the class labels of objects
in a cluster become more varied, the entropy increases. To
compute the entropy of a dataset, we need to calculate the
class distribution of the objects in each cluster as follows