Reply to comment

> It's not clear why there

> It's not clear why there are minus signs in the following line:

> = -9/14 log2 9/14 - 5/14 log2 5/14 = 0.947 bits

Because the log of numbers less than one is negative. The - makes the result positive. Technically, the definition of entropy includes the minus:

Sum ( - p log p)

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <h3> <h4> <p> <br/><img> <a> <em> <strong> <cite> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.
  • You may post PHP code. You should include <?php ?> tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

Adverts

Adverts