Is my entropy calculation correct? Clustering entropy example

1.1k Views Asked by At

I would like to calculate entropy of this example scheme

http://nlp.stanford.edu/IR-book/html/htmledition/evaluation-of-clustering-1.html

enter image description here

Equation of entropy

Then the entropy is (the first line)

enter image description here

So entropy is for this scheme

For the first cluster - ( (5/6)*Log(5/6) + (1/6)*Log(1/6) ) 
For the second cluster  - ( (1/6)*Log(1/6) + (1/6)*Log(1/6) + (4/6)*Log(4/6) )
For the third cluster  - ( (2/5)*Log(2/5) + (3/5)*Log(3/5) )

Final entropy is :

 FirtCluster_Entropy + SecondCluster_Entropy  + ThirdCluster_Entropy  

Am i correct?

1

There are 1 best solutions below

0
On

One step is missing, you must do the overall computation:

(N1/N)*FirtCluster_Entropy + (N2/N)*SecondCluster_Entropy  + (N3/N)*ThirdCluster_Entropy

Where N1=6, N2=6 and N3=5 correspond to length of each cluster, and N=17 is the total amount of objects. Then

H = (6/17)(0.650022421648) + (6/17)(1.25162916739) + (5/17)(0.970950594455)
 = 0.956744853323706