Skip to content

Main content

Information Gain Zero Cell Limit Tool

Evaluate one p*ln(p/q) cell contribution with its continuous p→0 limit and positive supplied q.

Loading tool…

Description

Return cell × (ln(cell) - ln(reference)), with zero at a zero cell and zeroCellLimit flagged.

Divergences and information densities compare probabilities on a common support. A weighted cell contribution and an unweighted logarithmic ratio differ, and zero-support cases require explicit limits.

Return cell × (ln(cell) - ln(reference)), with zero at a zero cell and zeroCellLimit flagged.

When to use this tool

Use Information Gain Zero Cell Limit when you need one precisely defined information-comparison term.

How to use the tool and how it works

  1. Enter cellProbability, referenceProbability. 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 contributionNats, zeroCellLimit. Inspect zeroCellLimit before interpreting the associated values.

Require cellProbability in [0, 1] and referenceProbability in (0, 1]. Return cell × (ln(cell) - ln(reference)), with zero at a zero cell and zeroCellLimit flagged.1

Input fieldMeaning and unitsAccepted input
cellProbabilityCell ProbabilityRequired. Finite number; minimum 0; maximum 1.
referenceProbabilityReference ProbabilityRequired. Finite number; maximum 1; strictly above 0.
Output fieldInterpretationReturned shape
contributionNatsContribution NatsRequired. Finite number.
zeroCellLimitZero Cell LimitRequired. Boolean.
json
{
  "input": {
    "cellProbability": 0,
    "referenceProbability": 0.5
  },
  "output": {
    "contributionNats": 0,
    "zeroCellLimit": true
  }
}

Limitations and assumptions

  • The result is in nats and can be negative for an individual cell; a zero reference is rejected even when the cell is zero.
  • 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

Align and validate complete distributions before summing terms or interpreting a full divergence or dependence measure.

References

  1. Calculation and input contract: information/information-gain-zero-cell-limit — tool.io

Similar or alternative tools