Browse Source

Distributions: fix sign of Categorical entropy #187

provider
Christoph Ruegg 13 years ago
parent
commit
d05918402f
  1. 2
      src/Numerics/Distributions/Categorical.cs

2
src/Numerics/Distributions/Categorical.cs

@ -237,7 +237,7 @@ namespace MathNet.Numerics.Distributions
/// </summary>
public double Entropy
{
get { return _pmfNormalized.Sum(p => p*Math.Log(p)); }
get { return -_pmfNormalized.Sum(p => p*Math.Log(p)); }
}
/// <summary>

Loading…
Cancel
Save