The inclusion rule for a candidate prediction

Lax303562.Candidate · concepts/Lax303562/Candidate.lean · lax-303562

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    A candidate prediction is included or not before the score is computed. Suppose it will match some annotation with probability pp and, when it does, with IoU jj. Whether it matches or not, the denominator rises by exactly ½½: a match turns a false negative into a true positive (n+1n + 1, fn1fn − 1, net +½), a miss adds a false positive (+½). The expected score after inclusion is therefore the exact quotient pqWithCandidatepqWithCandidate.

    The main statement is the inclusion rule: including the candidate raises the expected Panoptic Quality if and only if its expected contribution pjp · j exceeds half the current score. The remaining statements are the two directions in the form in which a decision procedure uses them, and the same rule solved for the match probability.

    Concept map
    2 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    This concept declares 4 statements. Each proof establishes one of them relative to its assumptions.

    1 candidate_iff proven

    2 equilibrium proven

    3 le_of_below proven

    4 lt_of_above proven

    Lean source view on GitHub

    1import Lax303562.PanopticQuality
    2
    3/-!
    4---
    5title: The inclusion rule for a candidate prediction
    6type: theorem
    7---
    8A candidate prediction is included or not before the score is computed. Suppose
    9it will match some annotation with probability `p` and, when it does, with IoU
    10`j`. Whether it matches or not, the denominator rises by exactly `½`: a match
    11turns a false negative into a true positive (`n + 1`, `fn − 1`, net `+½`), a miss
    12adds a false positive (`+½`). The expected score after inclusion is therefore
    13the exact quotient `pqWithCandidate`.
    14
    15The main statement is the inclusion rule: including the candidate raises the
    16expected Panoptic Quality if and only if its expected contribution `p · j`
    17exceeds half the current score. The remaining statements are the two directions
    18in the form in which a decision procedure uses them, and the same rule solved for
    19the match probability.
    20-/
    21
    22namespace Lax303562.Candidate
    23
    24open Lax303562.PanopticQuality
    25
    26/-- The expected Panoptic Quality after including a candidate that matches with
    27probability `p` and, when it matches, with IoU `j`. -/
    28noncomputable def pqWithCandidate (s p j : ℝ) (n fp fn : ℕ) : ℝ :=
    29 (s + p * j) / (den n fp fn + 1 / 2)
    30
    31/-- Including the candidate raises the expected score if and only if
    32`p · j > PQ / 2`. -/
    33axiom candidate_iff (s p j : ℝ) (n fp fn : ℕ) (hd : 0 < den n fp fn) :
    34 pq s n fp fn < pqWithCandidate s p j n fp fn ↔ pq s n fp fn / 2 < p * j
    35
    36/-- Above the threshold the candidate raises the score. -/
    37axiom lt_of_above (s p j : ℝ) (n fp fn : ℕ) (hd : 0 < den n fp fn)
    38 (h : pq s n fp fn / 2 < p * j) : pq s n fp fn < pqWithCandidate s p j n fp fn
    39
    40/-- At or below the threshold the candidate does not raise the score. -/
    41axiom le_of_below (s p j : ℝ) (n fp fn : ℕ) (hd : 0 < den n fp fn)
    42 (h : p * j ≤ pq s n fp fn / 2) : pqWithCandidate s p j n fp fn ≤ pq s n fp fn
    43
    44/-- The rule solved for the match probability: for a positive IoU `j`, the
    45candidate raises the score if and only if `p > PQ / (2 j)`. -/
    46axiom equilibrium (s p j : ℝ) (n fp fn : ℕ) (hd : 0 < den n fp fn) (hj : 0 < j) :
    47 pq s n fp fn < pqWithCandidate s p j n fp fn ↔ pq s n fp fn / (2 * j) < p
    48
    49end Lax303562.Candidate
    50
    Show ProofShow ProofShow ProofShow Proof
    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…