The inclusion rule for a candidate prediction
Lax303562.Candidate · concepts/Lax303562/Candidate.lean · lax-303562
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
A candidate prediction is included or not before the score is computed. Suppose it will match some annotation with probability and, when it does, with IoU . Whether it matches or not, the denominator rises by exactly : a match turns a false negative into a true positive (, , net ), a miss adds a false positive (). The expected score after inclusion is therefore the exact quotient .
The main statement is the inclusion rule: including the candidate raises the expected Panoptic Quality if and only if its expected contribution 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
Evidence
Lean source view on GitHub
| 1 | import Lax303562.PanopticQuality |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: The inclusion rule for a candidate prediction |
| 6 | type: theorem |
| 7 | --- |
| 8 | A candidate prediction is included or not before the score is computed. Suppose |
| 9 | it 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 |
| 11 | turns a false negative into a true positive (`n + 1`, `fn − 1`, net `+½`), a miss |
| 12 | adds a false positive (`+½`). The expected score after inclusion is therefore |
| 13 | the exact quotient `pqWithCandidate`. |
| 14 | |
| 15 | The main statement is the inclusion rule: including the candidate raises the |
| 16 | expected Panoptic Quality if and only if its expected contribution `p · j` |
| 17 | exceeds half the current score. The remaining statements are the two directions |
| 18 | in the form in which a decision procedure uses them, and the same rule solved for |
| 19 | the match probability. |
| 20 | -/ |
| 21 | |
| 22 | namespace Lax303562.Candidate |
| 23 | |
| 24 | open Lax303562.PanopticQuality |
| 25 | |
| 26 | /-- The expected Panoptic Quality after including a candidate that matches with |
| 27 | probability `p` and, when it matches, with IoU `j`. -/ |
| 28 | noncomputable 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`. -/ |
| 33 | axiom 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. -/ |
| 37 | axiom 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. -/ |
| 41 | axiom 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 |
| 45 | candidate raises the score if and only if `p > PQ / (2 j)`. -/ |
| 46 | axiom 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 | |
| 49 | end Lax303562.Candidate |
| 50 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments