Entropy Functions
The entropy functions determine variance and probability density across a given distribution.
- Cross Entropy (CROSSENTROPY): Computes cross-entropy, which is commonly used to quantify the difference between two probability distributions.
- Discrete Entropy Metric (DISCENTROPY): Calculates discrete entropy for maps on finite sets.
- Differential Entropy or Continuous Entropy Metrics: These functions compute differential entropy (also referred to as continuous entropy), which is entropy defined for distributions with a continuous random variable.
The URI for the data science functions is <http://cambridgesemantics.com/anzograph/statistics#>
. For readability, the syntax for each function below includes the prefix stats:
, defined as PREFIX stats: <http://cambridgesemantics.com/anzograph/statistics#>
.
Cross Entropy (CROSSENTROPY)
The Cross-entropy function computes cross-entropy, which is commonly used to quantify the difference between two probability distributions.
Syntax
stats:crossentropy(p, q)
Parameter | Type | Description |
---|---|---|
p | double | True probabilities for x. |
q | double | Predicted probabilities for x. |
Returns
Type | Description |
---|---|
double | The cross entropy value. |
Discrete Entropy Metric (DISCENTROPY)
The Discrete entropy function calculates entropy for maps on finite sets, referred to as discrete entropy.
Syntax
stats:discentropy("data")
Parameter | Type | Description |
---|---|---|
data | string | Column data. |
Returns
Type | Description |
---|---|
double | The discrete entropy value. |
Differential Entropy or Continuous Entropy Metrics
Differential entropy (also referred to as continuous entropy) is entropy that can be computed for distributions with a continuous random variable.
The following functions produce entropy calculations. For details about the functions, see Distribution Functions.
- Continuous Uniform Distribution (CONUNIDIST)
- Discrete Uniform Distribution (DISCUNIDIST)
- Exponential Distribution (EXPDIST)
- Laplace Distribution (LAPLACEDIST)
- Log Normal Distribution (LOGNORDIST)
- Normal Distribution (NORMDIST)
- Weibull Distribution (WEIBULDIST)