Regarding base value used of logarithmic in calculating Entropy

why we use log2 instead of log in calculating entropy of a set S

hey @amankharb ,
log base 2 is just a convention , which means we are calculating information gain in form of bits. A bit a smallest content/part of any information. Actually , this 2 was chosen while shannon was making this algorithm and as to be smallest available at that time he used it. hence it became a convention from then onwards. You can choose any value either be e , 4 , 10 , anything , it just depends on your choice and what you thinks the result will be.

I hope this would have resolved your doubt.
Thank You and Happy Learning :slightly_smiling_face:.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.