Shannon Entropy calculation to measure the information gain of an array of objects.