The removal rule for a prediction already in the list
Lax303562.Removal · concepts/Lax303562/Removal.lean · lax-303562
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
The mirror image of the inclusion rule. A prediction already in the list contributes to the numerator (probability of being matched, IoU when it is) and exactly to the denominator in both cases: removing a matched one turns a true positive into a false negative (net ), removing an unmatched one deletes a false positive (). The score after removal is the exact quotient .
Removing the prediction raises the Panoptic Quality if and only if its contribution is below half the current score. The hypothesis says that something remains after the removal, so the new denominator is positive. The last statement closes the circuit with : removing what inclusion added returns the original score.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax303562.PanopticQuality |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: The removal rule for a prediction already in the list |
| 6 | type: theorem |
| 7 | --- |
| 8 | The mirror image of the inclusion rule. A prediction already in the list |
| 9 | contributes `p · j` to the numerator (probability `p` of being matched, IoU `j` |
| 10 | when it is) and exactly `½` to the denominator in both cases: removing a matched |
| 11 | one turns a true positive into a false negative (net `−½`), removing an unmatched |
| 12 | one deletes a false positive (`−½`). The score after removal is the exact |
| 13 | quotient `pqWithoutPrediction`. |
| 14 | |
| 15 | Removing the prediction raises the Panoptic Quality if and only if its |
| 16 | contribution is below half the current score. The hypothesis `½ < den n fp fn` |
| 17 | says that something remains after the removal, so the new denominator is |
| 18 | positive. The last statement closes the circuit with `Candidate`: removing what |
| 19 | inclusion added returns the original score. |
| 20 | -/ |
| 21 | |
| 22 | namespace Lax303562.Removal |
| 23 | |
| 24 | open Lax303562.PanopticQuality |
| 25 | |
| 26 | /-- The Panoptic Quality after removing a prediction that contributed `p · j` to |
| 27 | the numerator and `½` to the denominator. -/ |
| 28 | noncomputable def pqWithoutPrediction (s p j : ℝ) (n fp fn : ℕ) : ℝ := |
| 29 | (s - p * j) / (den n fp fn - 1 / 2) |
| 30 | |
| 31 | /-- Removing the prediction raises the score if and only if `p · j < PQ / 2`. -/ |
| 32 | axiom removal_iff (s p j : ℝ) (n fp fn : ℕ) (hd : 1 / 2 < den n fp fn) : |
| 33 | pq s n fp fn < pqWithoutPrediction s p j n fp fn ↔ p * j < pq s n fp fn / 2 |
| 34 | |
| 35 | /-- Below the threshold, removal raises the score. -/ |
| 36 | axiom lt_of_below (s p j : ℝ) (n fp fn : ℕ) (hd : 1 / 2 < den n fp fn) |
| 37 | (h : p * j < pq s n fp fn / 2) : pq s n fp fn < pqWithoutPrediction s p j n fp fn |
| 38 | |
| 39 | /-- At or above the threshold, removal does not raise the score. -/ |
| 40 | axiom le_of_above (s p j : ℝ) (n fp fn : ℕ) (hd : 1 / 2 < den n fp fn) |
| 41 | (h : pq s n fp fn / 2 ≤ p * j) : pqWithoutPrediction s p j n fp fn ≤ pq s n fp fn |
| 42 | |
| 43 | /-- Inclusion followed by removal of the same prediction returns the original |
| 44 | score. -/ |
| 45 | axiom removal_inverts_inclusion (s p j : ℝ) (n fp fn : ℕ) : |
| 46 | (s + p * j - p * j) / (den n fp fn + 1 / 2 - 1 / 2) = pq s n fp fn |
| 47 | |
| 48 | end Lax303562.Removal |
| 49 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments