ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

func TestNDCGAtK(t *testing.T) · rank 2 discount

This relation defines rank 2 discount in the source section “func TestNDCGAtK(t *testing.T) · rank 2 discount”. Uses logarithmic scaling; its base and the positivity of its argument matter. Its interpretation depends on the source’s stated variables and conditions;…

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-77f0107bf915ec0dsource-comment-equation
rank2discount=1/log2(3)=0.6309297535714574rank 2 discount = 1/log2(3) = 0.6309297535714574

Read the equation

This relation defines rank 2 discount in the source section “func TestNDCGAtK(t *testing.T) · rank 2 discount”. Uses logarithmic scaling; its base and the positivity of its argument matter. 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 rank 2 discount as the quantity being defined or updated by this relation.

  2. Uses logarithmic scaling; its base and the positivity of its argument matter.

  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
}

// ---------- NDCGAtK ----------

func TestNDCGAtK(t *testing.T) {
	// Hand computed reference values. The discount for the id at one based rank r is 1/log2(r+1).
	// rank 1 discount = 1/log2(2) = 1.0
	// rank 2 discount = 1/log2(3) = 0.6309297535714574
	// rank 3 discount = 1/log2(4) = 0.5
	d1, d2, d3 := 1.0, 1.0/math.Log2(3), 0.5

	tests := []struct {
		name     string
		ranked   []string
		relevant map[string]bool
		k        int
		want     float64
	}{
Exact original notation
rank 2 discount = 1/log2(3) = 0.6309297535714574

Related builds

Sources & provenance

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