ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

func TestNDCGAtK(t *testing.T) · Two relevant ids at ranks one and three: dcg

This relation defines Two relevant ids at ranks one and three: dcg in the source section “func TestNDCGAtK(t *testing.T) · Two relevant ids at ranks one and three: dcg”. It specifies the displayed relationship between the named quantities or parameters. Its…

Implementation mathematicsSource recovered; runtime not executed
Learn with the Atlas

Learn to read this model

Start with the symbols, follow the operations, and check what the result means.

Open guided lesson
gh-eq-8ae251afb741d4edsource-comment-equation
Tworelevantidsatranksoneandthree:dcg=d1+d3,idcg=d1+d2(tworelevantideal).Two relevant ids at ranks one and three: dcg = d1 + d3, idcg = d1 + d2 (two relevant ideal).

Read the equation

This relation defines Two relevant ids at ranks one and three: dcg in the source section “func TestNDCGAtK(t *testing.T) · Two relevant ids at ranks one and three: dcg”. It specifies the displayed relationship between the named quantities or parameters. Its interpretation depends on the source’s stated variables and conditions; this record does not assign an unprovided physical or cognitive meaning to them.

Terms & definitions

The recovered passage does not supply a separate symbol table. Read the source context for the notation used in this version; familiar letters may carry different meanings in other builds.

How it works

  1. Read Two relevant ids at ranks one and three: dcg as the quantity being defined or updated by this relation.

  2. Substitute the source-defined variables or recorded values and follow the displayed arithmetic and indexing exactly.

  3. Use this version’s variable definitions and update order. The same symbol may be assigned a different meaning in another build.

Assumptions & limits

  • This source expression was recovered from the pinned code revision. Its presence does not establish that the associated program was built, run, or scientifically validated.

Original context

Read the surrounding source passage
		{"perfect internal order irrelevant", []string{"b", "a", "c"}, rel("a", "b"), 3, 1.0},
		// One relevant id at rank one with one irrelevant: ideal is also one relevant at rank one, so 1.0.
		{"single relevant at top", []string{"a", "x"}, rel("a"), 2, 1.0},
		// One relevant id at rank two: dcg = d2, idcg = d1, so nDCG = d2/d1 = d2.
		{"single relevant rank 2", []string{"x", "a"}, rel("a"), 2, d2 / d1},
		// One relevant id at rank three (k high enough): dcg = d3, idcg = d1.
		{"single relevant rank 3", []string{"x", "y", "a"}, rel("a"), 3, d3 / d1},
		// Two relevant ids at ranks one and three: dcg = d1 + d3, idcg = d1 + d2 (two relevant ideal).
		{"two relevant ranks 1 and 3", []string{"a", "x", "b"}, rel("a", "b"), 3, (d1 + d3) / (d1 + d2)},
		// Reversed: relevant ids at the bottom, both inside k.
		{"reversed both in k", []string{"x", "y", "b", "a"}, rel("a", "b"), 4,
			(1.0/math.Log2(4) + 1.0/math.Log2(5)) / (d1 + d2)},
		// No relevant id in the top k.
		{"none in top k", []string{"x", "y", "z"}, rel("a", "b"), 3, 0.0},
		// k larger than the list: only what is present counts; both relevant ids are at the top, so 1.0.
		{"k larger than list", []string{"a", "b"}, rel("a", "b"), 50, 1.0},
		// k smaller than the relevant count: ideal is bounded by k, one relevant fits, so a single relevant
		// id at rank one is perfect for that cutoff.
Exact original notation
Two relevant ids at ranks one and three: dcg = d1 + d3, idcg = d1 + d2 (two relevant ideal).

Related builds

Sources & provenance

Search equations, builds, manuscript text, and recovered sources.