Description
Average their natural logarithms by weight and exponentiate for perplexity.
Entropy summarizes uncertainty under a specified probability model and logarithm convention. Support indicators, one-symbol terms, and exponentiated entropies are components with different meanings.
Average their natural logarithms by weight and exponentiate for perplexity.
When to use this tool
Use Perplexity Mixture Log Average Term when you need one explicitly scoped entropy or support calculation.
How to use the tool and how it works
- Enter perplexities, weights. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read logPerplexity, perplexity. Use the output convention below.
Require aligned nonempty positive perplexities and nonnegative weights with positive total. Average their natural logarithms by weight and exponentiate for perplexity.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| perplexities | Perplexities | Required. Array of finite number; maximum items 256. |
| weights | Weights | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| logPerplexity | Log Perplexity | Required. Finite number. |
| perplexity | Weighted geometric mean of supplied perplexities, not a distribution-mixture perplexity in general. | Required. Finite number. |
{
"input": {
"perplexities": [
2,
8
],
"weights": [
1,
1
]
},
"output": {
"logPerplexity": 1.3862943611198906,
"perplexity": 4
}
} Limitations and assumptions
- This is a weighted geometric mean, not generally the perplexity of a mixture distribution; weights and averaging basis are supplied.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Validate and align complete probability distributions before aggregating terms or interpreting an uncertainty estimate.
References
Similar or alternative tools
- Information: Entropy Effective Alphabet Size
Return exp(entropy × ln(base)) for effectiveAlphabetSize.
- Information: Entropy Concavity Single Mixture Gap
Compute both Shannon entropies, entropy of their weighted mixture, and mixture entropy minus weighted component entropies.