Rakesh9100 / CalcDiverse

CalcDiverse is a customized collection of calculators for various aspects of mathematics. Individuals with basic web development knowledge can create distinctive calculators and submit pull requests.
https://calcdiverse.netlify.app
Apache License 2.0
150 stars 387 forks source link

[Feature] Add Entropy Calculator #971

Closed SuhainaFathimaM closed 5 months ago

SuhainaFathimaM commented 5 months ago

Description

Adding an entropy calculator

Screenshots

No response

Checklist

Code of Conduct

github-actions[bot] commented 5 months ago

Hey @SuhainaFathimaM, Welcome to the project CalcDiverse! 🎊 Thanks for opening an issue! 🙌 Please wait for the issue to be assigned. Happy Coding!! ✨

Rakesh9100 commented 5 months ago

Pls provide the description of what this calculator will do clearly @SuhainaFathimaM

Rakesh9100 commented 5 months ago

Any update on this @SuhainaFathimaM

SuhainaFathimaM commented 5 months ago

Entropy Calculator calculates the entropy from the probabilities which is the input..

Eg : You tell the function the probabilities of picking each color: For example, you might tell it that there's a 25% chance of picking a red ball, a 50% chance of picking a blue ball, and a 25% chance of picking a green ball. The function calculates the entropy:

probabilities = [0.25, 0.5, 0.25] ---> Input

  1. entropy = 0
  2. probability = 0.25
    • 0.25 * math.log2(0.25) = 0.5
    • entropy = 0 + 0.5 = 0.5
  3. probability = 0.5
    • 0.5 * math.log2(0.5) = 0.5
    • entropy = 0.5 + 0.5 = 1.0
  4. probability = 0.25
    • 0.25 * math.log2(0.25) = 0.5
    • entropy = 1.0 + 0.5 = 1.5

Output: entropy = 1.5

High entropy: Means a lot of uncertainty. Low entropy: Means less uncertainty

Rakesh9100 commented 5 months ago

Go ahead @SuhainaFathimaM

github-actions[bot] commented 5 months ago

Hello @SuhainaFathimaM! Your issue #971 has been closed. Thank you for your contribution!! 🙌