Skip to content

Main content

Perplexity Mixture Log Average Term Tool

Calculate perplexity mixture log average term from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter perplexities, weights. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
perplexitiesPerplexitiesRequired. Array of finite number; maximum items 256.
weightsWeightsRequired. Array of finite number; maximum items 256.
Output fieldInterpretationReturned shape
logPerplexityLog PerplexityRequired. Finite number.
perplexityWeighted geometric mean of supplied perplexities, not a distribution-mixture perplexity in general.Required. Finite number.
json
{
  "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

  1. Calculation and input contract: information/perplexity-mixture-log-average-term — tool.io

Similar or alternative tools