Lemma 19.7: for k ā„ 10 independent Bernoulli(pįµ¢) labels with mean p, E P_{yā¼p}[y ā š[p' > 1/2]] ⤠(1 + ā(8/k)) P_{yā¼p}[y ā š[p > 1/2]]
ProvedUnderstandingML.knn_label_lemmachernoff-boundmajority-votenearest-neighbor
Lemma 19.7. Let and let be independent Bernoulli random variables with . Denote and . Then
Formally: , the have the product law of the Bernoulli laws, is the majority of the , and bernoulliErr p y'.
Preamble
import Definitions.Def_UnderstandingML_NearestNeighbor open MeasureTheory
Formal statement
namespace UnderstandingML
/-- **Lemma 19.7** (p. 266). Let `k ā„ 10` and let `Zā, ā¦, Z_k` be independent Bernoulli random
variables with `P[Zįµ¢ = 1] = pįµ¢`. Denote `p = (1/k) āįµ¢ pįµ¢` and `p' = (1/k) āįµ¢ Zįµ¢`. Then
`E_{Zā, ā¦, Z_k} P_{y ā¼ p}[y ā š[p' > 1/2]] ⤠(1 + ā(8/k)) P_{y ā¼ p}[y ā š[p > 1/2]]`.
Here `š[p' > 1/2]` is the majority of the `Zįµ¢` and `P_{y ā¼ p}[y ā y'] = bernoulliErr p y'`. -/
theorem knn_label_lemma (k : ā) (hk : 10 ⤠k) (p : Fin k ā ā) (hp : ā i, p i ā Set.Icc (0 : ā) 1) :
ā« Z, bernoulliErr ((ā i, p i) / k) (majority Z) ā(Measure.pi (fun i ⦠bernoulliLaw (p i))) ā¤
(1 + Real.sqrt (8 / k)) * bernoulliErr ((ā i, p i) / k) (decide (1 / 2 < (ā i, p i) / k)) := by sorry
end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §19.6 p. 266, Lemma 19.7 (Exercise 2)
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.