Skip to content

Main content

Metrics: Rank Discount Position Tool

Return a single DCG logarithmic position discount under one-based rank indexing; no relevance gains or ranking metric aggregation.

Loading tool…

Description

Return 1 / log2(rank + 1) for a one-based positive integer rank.

Ranking metrics compare order or discount relevance by position. Ties, one-based ranks, and normalization choices change the contribution of an individual pair or rank.

Return 1 / log2(rank + 1) for a one-based positive integer rank.

When to use this tool

Use Metrics: Rank Discount Position when you need one rank discount, tie block, or pairwise contribution.

How to use the tool and how it works

  1. Enter rank. 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 result. Expand result to inspect the returned fields.

Return 1 / log2(rank + 1) for a one-based positive integer rank.1

Input fieldMeaning and unitsAccepted input
rankRankRequired. Safe integer.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.discountDiscountCalculated result member: number.
json
{
  "input": {
    "rank": 3
  },
  "output": {
    "result": {
      "discount": 0.5
    }
  }
}

Limitations and assumptions

  • This is the discount factor alone, not discounted gain, NDCG, or a complete ranking score.
  • Outputs are nested inside result. 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

Evaluate the full ranked set with a documented gain transformation, tie convention, and normalization.

References

  1. Calculation and input contract: metrics/rank-discount-position — tool.io

Similar or alternative tools