Stat.Nonparametric.LocalPoly.RandomDesignRate
One-dimensional random-design local-polynomial rates: kernel-moment Bernstein concentration, a deterministic design-event bridge, and unconditional clipped-intercept pointwise MSE and balancing-bandwidth bounds.
Basic 19 core · 6 supporting The setting is one-dimensional local-polynomial regression at an interior point x₀. ★ of_contDiff
Random-design local-polynomial regression in dimension one: model, constants, estimator
The setting is one-dimensional local-polynomial regression at an interior point x₀. The design
points are independent draws from a law with a Lebesgue density that is bounded above and below
by positive constants on a window [x₀ − r, x₀ + r]; the kernel is measurable, nonnegative,
bounded, supported on [−1, 1], and bounded below on a subinterval [−Δ, Δ].
This file defines the two bundles of assumptions (KernelDesign with the upper bounds only, and
InteriorDesign adding the lower bounds), the kernel-weighted empirical and population moment
matrices and the event on which they are entrywise close, the explicit constants that enter the
risk bound, the local Hölder class of regression functions, and the estimator: the weighted
least-squares intercept (zero by convention when the weighted design matrix is singular) and its
clipped version.
References: Tsybakov (2009), Introduction to Nonparametric Estimation, §1.6 (https://doi.org/10.1007/b13794); Fan and Gijbels (1996), Local Polynomial Modelling and Its Applications, Theorem 3.1; Stone (1982), Optimal global rates of convergence for nonparametric regression. Tsybakov's Theorem 1.7 is stated for a fixed design; the concentration step of this directory supplies the random-design argument.
Design law and kernel for kernel-weighted moments in dimension one. The design points are drawn from a probability law on the real line with a measurable nonnegative Lebesgue density f. Around the evaluation point x₀ there is a window [x₀ − r, x₀ + r] of positive radius on which f ≤ f_max. The kernel K is measurable, nonnegative, zero outside [−1, 1] and at most K_max.
Definition (Lean source)
Design, kernel and evaluation point for one-dimensional local-polynomial regression at an interior point. In addition to a design law whose density f is at most f_max on a window [x₀ − r, x₀ + r] around the evaluation point, and a measurable nonnegative kernel K ≤ K_max vanishing outside [−1, 1], the density satisfies f ≥ f_min on the window with f_min > 0, and the kernel is at least K_min with K_min > 0 on an interval [−Δ, Δ] with Δ > 0.
Definition (Lean source)
For a kernel K and an evaluation point x₀, as carried by a design, a bandwidth h, two exponents j and k and a design point x, the kernel-weighted monomial is K(u) · u^j · u^k with u = (x − x₀)/h.
Definition (Lean source)
For a design law with kernel K and evaluation point x₀, a polynomial degree p and a bandwidth h, the population moment matrix is the (p+1) × (p+1) matrix whose (j,k) entry is E[K(u) u^(j+k)] / h, where u = (X − x₀)/h and X is one draw from the design law.
Definition (Lean source)
For a kernel K and evaluation point x₀, as carried by a design, a polynomial degree p, a bandwidth h and design points x_1, …, x_N, the empirical moment matrix is the (p+1) × (p+1) matrix whose (j,k) entry is (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), where u_i = (x_i − x₀)/h.
Definition (Lean source)
For a design law with kernel K and evaluation point x₀, a polynomial degree p, a bandwidth h, a sample size N and a tolerance t, the moment event is the set of design vectors (x_1, …, x_N) for which every entry (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i = (x_i − x₀)/h, 0 ≤ j, k ≤ p, of the empirical moment matrix is within t of its expectation E[K(u) u^(j+k)] / h.
Definition (Lean source)
For a kernel that is at least K_min > 0 on an interval [−Δ, Δ], as carried by a design, and a polynomial degree p, the reference moment matrix is the (p+1) × (p+1) matrix with (j,k) entry ∫_{−Δ}^{Δ} u^(j+k) du.
Definition (Lean source)
For a design whose density is at least f_min > 0 near the evaluation point and whose kernel is at least K_min > 0 on [−Δ, Δ], and a polynomial degree p, the inverse-row constant is c_row = (p+1) · tr(R⁻¹) / (f_min K_min), where R is the matrix of monomial moments ∫_{−Δ}^{Δ} u^(j+k) du.
Definition (Lean source)
For a design whose density is at least f_min > 0 near the evaluation point, with kernel K, and a polynomial degree p, the intercept inverse constant is c_inv = (G⁻¹)₀₀ / f_min, where G is the (p+1) × (p+1) kernel moment matrix with (j,k) entry ∫ K(u) u^(j+k) du.
Definition (Lean source)
For a design whose density is at most f_max near the evaluation point, with kernel K, the total-weight constant is c_top = f_max · ∫ K(u) du.
Definition (Lean source)
For a design with density bounds f_min ≤ f_max near the evaluation point and a kernel bounded below on [−Δ, Δ], and a polynomial degree p, the design tolerance is t₀ = min(1, 1/(2 (p+1) c_row), c_inv/(2 (p+1) c_row²)), where c_row = (p+1) tr(R⁻¹)/(f_min K_min) and c_inv = (G⁻¹)₀₀/f_min are built from the monomial moment matrix R on [−Δ, Δ] and the kernel moment matrix G.
Definition (Lean source)
For a design whose density is at most f_max near the evaluation point and whose kernel is at most K_max, and a tolerance t, the Bernstein exponent is t² / (4 (2 f_max K_max² + K_max t)).
Definition (Lean source)
For a design whose density is at most f_max near the evaluation point and whose kernel is at most K_max, a polynomial degree p, a sample size N, a bandwidth h and a tolerance t, the failure bound is 2 (p+1)² exp(−N h t² / (4 (2 f_max K_max² + K_max t))).
Definition (Lean source)
A regression function m belongs to the local Hölder class with smoothness β and constant H on the window [x₀ − r, x₀ + r] when β > 0, H ≥ 0, m is p times continuously differentiable on the window, where p = ⌈β⌉ − 1 is the largest integer strictly below β, and its p-th derivative within the window satisfies |m⁽ᵖ⁾(x) − m⁽ᵖ⁾(y)| ≤ H |x − y|^(β − p) for all x, y in the window.
Definition (Lean source)
Global smoothness implies membership in the local Hölder class. For a window [x₀ − r, x₀ + r] of positive radius, if β > 0, H ≥ 0, m is p = ⌈β⌉ − 1 times continuously differentiable on the whole real line, and its p-th derivative satisfies |m⁽ᵖ⁾(x) − m⁽ᵖ⁾(y)| ≤ H |x − y|^(β − p) for all x, y in the window, then m belongs to the local Hölder class of smoothness β and constant H on the window.
Formal statement
Proof (Lean source)
For a design with density bounds f_min ≤ f_max near the evaluation point and kernel K, a smoothness β and a Hölder constant H, the bias constant is C_bias = (H / p!) · √(2 c_inv (c_top + 1)), where p = ⌈β⌉ − 1, c_inv = (G⁻¹)₀₀ / f_min, c_top = f_max ∫ K(u) du, and G is the (p+1) × (p+1) kernel moment matrix.
Definition (Lean source)
For a design with density lower bound f_min near the evaluation point and a kernel at most K_max, a polynomial degree p and a noise scale σ, the variance constant is C_var = 2 σ² K_max c_inv, where c_inv = (G⁻¹)₀₀ / f_min and G is the (p+1) × (p+1) kernel moment matrix.
Definition (Lean source)
For a kernel K and evaluation point x₀, as carried by a design, a polynomial degree p, a bandwidth h, design points x_1, …, x_N and responses y_1, …, y_N, the local-polynomial intercept is ∑_i S_i y_i with weights S_i = ∑_k (M⁻¹)_{0k} K(u_i) (x_i − x₀)^k, where u_i = (x_i − x₀)/h and M is the weighted design matrix with (j,k) entry ∑_i K(u_i) (x_i − x₀)^(j+k).
Definition (Lean source)
For a kernel K and evaluation point x₀, as carried by a design, a polynomial degree p, a bandwidth h, a clipping level M, design points x_1, …, x_N and responses y_1, …, y_N, the clipped local-polynomial intercept is the weighted least-squares intercept of the degree-p fit at x₀ (zero by convention when the weighted design matrix is singular), moved to the nearest point of [−M, M].
Definition (Lean source)
6 supporting declarations (lemmas, instances)
-
instCoeInteriorDesignKernelDesigninstance — An interior design is read as its underlying design law and kernel wherever only the upper bounds on the density and the kernel are needed.instancegiven by⟨InteriorDesign.toKernelDesign⟩ -
upper_nonnegtheorem — For a design whose nonnegative density is at most f_max on a window around the evaluation point, f_max ≥ 0.Proof (Lean source)
theorem KernelDesign.upper_nonneg (D : KernelDesign) : 0 ≤ D.upper := (D.density_nonneg D.center).trans (D.density_upper D.center (by simpa using D.radius_pos.le)) -
kernelMax_nonnegtheorem — For a nonnegative kernel that is at most K_max, K_max ≥ 0.Proof (Lean source)
theorem KernelDesign.kernelMax_nonneg (D : KernelDesign) : 0 ≤ D.kernelMax := (D.kernel_nonneg 0).trans (D.kernel_upper 0) -
lower_le_uppertheorem — For a design whose density lies between f_min and f_max on a window around the evaluation point, f_min ≤ f_max.Proof (Lean source)
theorem InteriorDesign.lower_le_upper (D : InteriorDesign) : D.lower ≤ D.upper := (D.density_lower D.center (by simpa using D.radius_pos.le)).trans (D.density_upper D.center (by simpa using D.radius_pos.le)) -
kernelMax_postheorem — For a kernel that is at most K_max and at least K_min > 0 on an interval around zero, K_max > 0.Proof (Lean source)
theorem InteriorDesign.kernelMax_pos (D : InteriorDesign) : 0 < D.kernelMax := D.kernelMin_pos.trans_le ((D.kernel_lower 0 (by simpa using D.subradius_pos.le)).trans (D.kernel_upper 0)) -
subradius_le_onetheorem — For a kernel that vanishes outside [−1, 1] and is at least K_min > 0 on [−Δ, Δ], Δ ≤ 1.Proof (Lean source)
theorem InteriorDesign.subradius_le_one (D : InteriorDesign) : D.subradius ≤ 1 := by by_contra hlt have hpos := D.subradius_pos have hlow := D.kernel_lower D.subradius (by rw [abs_of_pos hpos]) rw [D.kernel_support D.subradius (by rw [abs_of_pos hpos]; exact lt_of_not_ge hlt)] at hlow exact absurd D.kernelMin_pos (not_lt.mpr hlow)
ConditionalRisk 2 core · 7 supporting For fixed design points and independent responses with conditional means m(x_i) and conditional variances at most σ², the mean-squared error of the local-polynomial intercept is at most its squared noise-free bias plus σ ★ windowed_localPoly_bias★ localPoly_fibre_mse_of_designBounds
Conditional risk of the clipped local-polynomial intercept on a fixed design, dimension one
For fixed design points and independent responses with conditional means m(x_i) and
conditional variances at most σ², the mean-squared error of the local-polynomial intercept is
at most its squared noise-free bias plus σ² times the sum of squared equivalent-kernel weights
(rawIntercept_fibre_mse_le). The bias is at most (H / p!) L h^β for a Hölder regression
function when the leverage product of the design is at most L² (windowed_localPoly_bias);
design points outside the kernel window carry zero weight and are unrestricted.
localPoly_fibre_mse_of_designBounds combines the two: on a design whose inverse intercept
entry is of order 1/(N h) and whose leverage product is bounded, the intercept clipped to
[−M, M] has conditional mean-squared error at most C_bias² h^(2β) + C_var/(N h), because
clipping cannot increase the squared distance to a target inside [−M, M]. The responses need
only finite conditional second moments.
Bias of the local-polynomial intercept on a fixed design. Let the kernel K be nonnegative and zero outside [−1, 1], with evaluation point x₀ and window radius r, and let the regression function m be, on the window [x₀ − r, x₀ + r], p = ⌈β⌉ − 1 times continuously differentiable with p-th derivative Hölder of order β − p and constant H. For a positive bandwidth h not exceeding r and design points x_1, …, x_N whose weighted design matrix M is invertible with √(M₀₀ (M⁻¹)₀₀) ≤ L, the intercept computed from the noise-free responses m(x_i) satisfies |∑_i S_i m(x_i) − m(x₀)| ≤ (H / p!) · L · h^β.
Formal statement
Proof (Lean source)
Conditional mean-squared error on a design with bounded leverage, dimension one. Let the kernel K be nonnegative, at most K_max and zero outside [−1, 1], with evaluation point x₀ and window radius r, and let the regression function m be, on the window [x₀ − r, x₀ + r], p = ⌈β⌉ − 1 times continuously differentiable with p-th derivative Hölder of order β − p and constant H. Take a positive bandwidth h not exceeding r, a clipping level M with |m(x₀)| ≤ M, and design points x_1, …, x_N, and let the responses be independent with Y_i drawn from a conditional outcome distribution that at each x_i in the window [x₀ − r, x₀ + r] has a finite second moment, mean m(x_i) and variance at most σ². If the weighted design matrix M_x is invertible, (M_x⁻¹)₀₀ ≤ 2 c_inv/(N h) and √((M_x)₀₀ (M_x⁻¹)₀₀) ≤ √(2 c_inv (c_top + 1)), then the degree-p intercept clipped to [−M, M] satisfies E[(m̂ − m(x₀))²] ≤ C_bias² h^(2β) + C_var/(N h), the expectation being over the responses.
Formal statement
Proof (Lean source)
7 supporting declarations (lemmas, instances)
-
equivKernelWeight_eq_zero_of_outsidetheorem — For a kernel K that vanishes outside [−1, 1], with evaluation point x₀, a positive bandwidth h and design points x_1, …, x_N, if |x_i − x₀| > h then the equivalent-kernel weight S_i = ∑_k (M⁻¹)_{0k} K((x_i − x₀)/h) (x_i − x₀)^k of the i-th observation is zero.hypothesesconclusionequivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i= 0Proof (Lean source)
theorem equivKernelWeight_eq_zero_of_outside (D : KernelDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hh : 0 < h) (x : Fin N → ℝ) {i : Fin N} (hi : ¬ |x i - D.center| ≤ h) : equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i = 0 := by have hw : D.kernel ((x i - D.center) / h) = 0 := by apply D.kernel_support rw [abs_div, abs_of_pos hh] exact (lt_div_iff₀ hh).2 (by simpa only [one_mul] using lt_of_not_ge hi) simp [equivKernelWeight, hw] -
rawIntercept_measurabletheorem — For a measurable kernel and an evaluation point, as carried by a design, the local-polynomial intercept is a jointly measurable function of the design points and the responses, for every degree, sample size and bandwidth.hypothesesconclusionProof (Lean source)
@[fun_prop] theorem rawIntercept_measurable (D : KernelDesign) (p N : ℕ) (h : ℝ) : Measurable (fun z : (Fin N → ℝ) × (Fin N → ℝ) => rawIntercept D p h z.1 z.2) := by have hw : ∀ i, Measurable (fun z : (Fin N → ℝ) × (Fin N → ℝ) => D.kernel ((z.1 i - D.center) / h)) := fun i => D.kernel_measurable.comp (by fun_prop) have hA : ∀ j k : Fin (p + 1), Measurable (fun z : (Fin N → ℝ) × (Fin N → ℝ) => designMatrix p (fun i => z.1 i - D.center) (fun i => D.kernel ((z.1 i - D.center) / h)) j k) := by intro j k unfold designMatrix fun_prop have hInv := measurable_matrix_inv_apply _ hA unfold rawIntercept equivKernelWeight fun_prop -
clippedIntercept_measurabletheorem — For a measurable kernel and an evaluation point, as carried by a design, the clipped local-polynomial intercept is a jointly measurable function of the design points and the responses, for every degree, sample size, bandwidth and clipping level.hypothesesconclusionProof (Lean source)
@[fun_prop] theorem clippedIntercept_measurable (D : KernelDesign) (p N : ℕ) (h M : ℝ) : Measurable (fun z : (Fin N → ℝ) × (Fin N → ℝ) => clippedIntercept D p h M z.1 z.2) := (measurable_clipIcc (-M) M).comp (rawIntercept_measurable D p N h) -
fibre_response_momentstheorem — Fix design points x_1, …, x_N and a set A of indices, and let the responses Y_1, …, Y_N be independent with Y_i drawn from a conditional outcome distribution at x_i. If for each i in A this distribution has a finite second moment, mean m(x_i) and variance at most σ², then the masked responses Z_i, equal to Y_i for i in A and to zero otherwise, are square integrable, have variance at most σ², are pairwise uncorrelated, and have mean m(x_i) for i in A and zero otherwise.Proof (Lean source)
theorem fibre_response_moments {N : ℕ} (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] (m : ℝ → ℝ) (σ : ℝ) (x : Fin N → ℝ) (A : Set (Fin N)) (hx : ∀ i ∈ A, MemLp (fun y : ℝ => y) 2 (κ (x i)) ∧ (∫ y, y ∂κ (x i)) = m (x i) ∧ Var[fun y : ℝ => y; κ (x i)] ≤ σ ^ 2) : let μ := Measure.pi (fun i => κ (x i)) (∀ i : Fin N, MemLp (fun y : Fin N → ℝ => A.indicator y i) 2 μ) ∧ UncorrelatedVarianceFamily (fun i (y : Fin N → ℝ) => A.indicator y i) μ σ ∧ (∀ i : Fin N, (∫ y : Fin N → ℝ, A.indicator y i ∂μ) = A.indicator (fun i => m (x i)) i) := by dsimp only have hin : ∀ i ∈ A, (fun y : Fin N → ℝ => A.indicator y i) = fun y => y i := fun i hi => by funext y exact Set.indicator_of_mem hi y have hout : ∀ i ∉ A, (fun y : Fin N → ℝ => A.indicator y i) = fun _ => 0 := fun i hi => by funext y exact Set.indicator_of_notMem hi y have hYin : ∀ i ∈ A, MemLp (fun y : Fin N → ℝ => y i) 2 (Measure.pi (fun i => κ (x i))) := fun i hi => (hx i hi).1.comp_measurePreserving (measurePreserving_eval _ i) have hY : ∀ i : Fin N, MemLp (fun y : Fin N → ℝ => A.indicator y i) 2 (Measure.pi (fun i => κ (x i))) := by intro i by_cases hi : i ∈ A · rw [hin i hi] exact hYin i hi · rw [hout i hi] exact memLp_const 0 refine ⟨hY, ⟨?_, ?_⟩, ?_⟩ · intro i dsimp only by_cases hi : i ∈ A · rw [hin i hi] exact ((measurePreserving_eval (fun i => κ (x i)) i).variance_fun_comp (f := fun y : ℝ => y) measurable_id.aemeasurable).le.trans (hx i hi).2.2 · rw [hout i hi] rw [show (fun _ : Fin N → ℝ => (0 : ℝ)) = 0 from rfl, variance_zero] exact sq_nonneg σ · intro i j hij dsimp only by_cases hi : i ∈ A · by_cases hj : j ∈ A · rw [hin i hi, hin j hj] exact ((iIndepFun_pi (fun i => measurable_id.aemeasurable)).indepFun hij).covariance_eq_zero (hYin i hi) (hYin j hj) · rw [hout j hj] exact covariance_const_right 0 · rw [hout i hi] exact covariance_const_left 0 · intro i by_cases hi : i ∈ A · rw [hin i hi, Set.indicator_of_mem hi, integral_eval] exact (hx i hi).2.1 · rw [hout i hi, Set.indicator_of_notMem hi] simp -
rawIntercept_eq_sum_indicatortheorem — For a kernel K that vanishes outside [−1, 1], with evaluation point x₀, and a positive bandwidth h, the local-polynomial intercept ∑_i S_i y_i is unchanged when every response y_i with |x_i − x₀| > h is replaced by zero.hypothesesconclusionrawIntercept D p h x y= ∑ i, equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i * {i | |x i - D.center| ≤ h}.indicator y iProof (Lean source)
theorem rawIntercept_eq_sum_indicator (D : KernelDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hh : 0 < h) (x y : Fin N → ℝ) : rawIntercept D p h x y = ∑ i, equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i * {i | |x i - D.center| ≤ h}.indicator y i := by unfold rawIntercept refine Finset.sum_congr rfl (fun i _ => ?_) by_cases hi : |x i - D.center| ≤ h · rw [Set.indicator_of_mem (by exact hi)] · rw [equivKernelWeight_eq_zero_of_outside D p hh x hi, zero_mul, zero_mul] -
rawIntercept_fibre_memLptheorem — Fix a kernel K that vanishes outside [−1, 1], with evaluation point x₀, a positive bandwidth h and design points x_1, …, x_N, and let the responses be independent with Y_i drawn from a conditional outcome distribution at x_i. If this distribution has a finite second moment at every x_i with |x_i − x₀| ≤ h, then the local-polynomial intercept ∑_i S_i Y_i is square integrable.hypothesesD :p :ℕN :ℕh :ℝhh :0 < hκ :Kernel ℝ ℝx :Fin N → ℝhx :∀ iif|x i - D.center| ≤ hthenMemLp (fun y : ℝ => y) 2 (κ (x i))conclusionMemLp (fun y => rawIntercept D p h x y) 2 (Measure.pi (fun i => κ (x i)))Proof (Lean source)
theorem rawIntercept_fibre_memLp (D : KernelDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hh : 0 < h) (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] (x : Fin N → ℝ) (hx : ∀ i, |x i - D.center| ≤ h → MemLp (fun y : ℝ => y) 2 (κ (x i))) : MemLp (fun y => rawIntercept D p h x y) 2 (Measure.pi (fun i => κ (x i))) := by have hfun : (fun y => rawIntercept D p h x y) = fun y => ∑ i, equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i * {i | |x i - D.center| ≤ h}.indicator y i := funext (rawIntercept_eq_sum_indicator D p hh x) rw [hfun] refine memLp_finsetSum _ (fun i _ => MemLp.const_mul ?_ _) by_cases hi : |x i - D.center| ≤ h · have he : (fun y : Fin N → ℝ => {i | |x i - D.center| ≤ h}.indicator y i) = fun y => y i := funext fun y => Set.indicator_of_mem (by exact hi) y rw [he] exact (hx i hi).comp_measurePreserving (measurePreserving_eval _ i) · have he : (fun y : Fin N → ℝ => {i | |x i - D.center| ≤ h}.indicator y i) = fun _ => 0 := funext fun y => Set.indicator_of_notMem (by exact hi) y rw [he] exact memLp_const 0 -
rawIntercept_fibre_mse_letheorem — Bias–variance bound on a fixed design. Fix a kernel K that vanishes outside [−1, 1], with evaluation point x₀, a positive bandwidth h and design points x_1, …, x_N, and let the responses be independent with Y_i drawn from a conditional outcome distribution at x_i. If at every x_i with |x_i − x₀| ≤ h this distribution has a finite second moment, mean m(x_i) and variance at most σ², then the local-polynomial intercept m̂ = ∑_i S_i Y_i satisfies E[(m̂ − m(x₀))²] ≤ (∑_i S_i m(x_i) − m(x₀))² + σ² ∑_i S_i².hypothesesconclusion(∫ y, (rawIntercept D p h x y - m D.center) ^ 2 ∂Measure.pi (fun i => κ (x i)))≤ (rawIntercept D p h x (fun i => m (x i)) - m D.center) ^ 2+ σ ^ 2 * ∑ i, (equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i) ^ 2Proof (Lean source)
theorem rawIntercept_fibre_mse_le (D : KernelDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hh : 0 < h) (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] (m : ℝ → ℝ) (σ : ℝ) (x : Fin N → ℝ) (hx : ∀ i, |x i - D.center| ≤ h → MemLp (fun y : ℝ => y) 2 (κ (x i)) ∧ (∫ y, y ∂κ (x i)) = m (x i) ∧ Var[fun y : ℝ => y; κ (x i)] ≤ σ ^ 2) : (∫ y, (rawIntercept D p h x y - m D.center) ^ 2 ∂Measure.pi (fun i => κ (x i))) ≤ (rawIntercept D p h x (fun i => m (x i)) - m D.center) ^ 2 + σ ^ 2 * ∑ i, (equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) i) ^ 2 := by classical let μ := Measure.pi (fun i => κ (x i)) let A : Set (Fin N) := {i | |x i - D.center| ≤ h} let S : Fin N → ℝ := equivKernelWeight p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) let F : (Fin N → ℝ) → ℝ := fun y => ∑ i, S i * A.indicator y i obtain ⟨hY, hnoise, hmean⟩ := fibre_response_moments κ m σ x A hx have hraw : ∀ y, rawIntercept D p h x y = F y := rawIntercept_eq_sum_indicator D p hh x have hfit : MemLp F 2 μ := memLp_finsetSum _ (fun i _ => (hY i).const_mul (S i)) have hμfit : (∫ y, F y ∂μ) = F (fun i => m (x i)) := by change (∫ y, ∑ i, S i * A.indicator y i ∂μ) = ∑ i, S i * A.indicator (fun i => m (x i)) i rw [integral_finsetSum _ (fun i _ => ((hY i).integrable (by simp)).const_mul _)] simp_rw [integral_const_mul, hmean] have hvar := linearSmoother_variance_le hY hnoise (S := S) (V := ∑ i, S i ^ 2) le_rfl have herr : MemLp (fun y => F y - m D.center) 2 μ := hfit.sub (memLp_const _) have hid := variance_eq_sub herr rw [variance_sub_const hfit.aestronglyMeasurable, integral_sub (hfit.integrable (by simp)) (integrable_const _), integral_const, probReal_univ, one_smul, hμfit] at hid simp_rw [hraw] change (∫ y, (F y - m D.center) ^ 2 ∂μ) ≤ _ change Var[F; μ] ≤ _ at hvar change Var[F; μ] = (∫ y, (F y - m D.center) ^ 2 ∂μ) - (F (fun i => m (x i)) - m D.center) ^ 2 at hid dsimp only [S] at hvar linarith
GoodDesign 1 core · 4 supporting On the event that every normalized empirical kernel moment is within the explicit tolerance of its expectation, the weighted design matrix M of the local-polynomial fit is invertible, its intercept inverse entry is of or ★ localPoly_leverage_on_momentEvent
The moment event implies a well-conditioned local-polynomial design
On the event that every normalized empirical kernel moment is within the explicit tolerance of
its expectation, the weighted design matrix M of the local-polynomial fit is invertible, its
intercept inverse entry is of order 1/(N h), and the leverage product M₀₀ (M⁻¹)₀₀ is bounded
by a constant (localPoly_leverage_on_momentEvent). The proof rewrites M in the rescaled basis
as D_h B D_h, with B = N h · (empirical moment matrix) and D_h the diagonal matrix of
bandwidth powers, and applies the deterministic inverse-perturbation and leverage bounds for
density-weighted designs.
rawIntercept_eq_wls_intercept adds that on this event the estimator is the intercept of the
weighted least-squares polynomial fit.
On the moment event the design is good. Let the design density lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Take a positive sample size N, a positive bandwidth h not exceeding r, and design points x_1, …, x_N for which every empirical moment (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i = (x_i − x₀)/h, 0 ≤ j, k ≤ p, is within the design tolerance t₀ of its expectation. Then the weighted design matrix M with entries ∑_i K(u_i) (x_i − x₀)^(j+k) is invertible, (M⁻¹)₀₀ ≤ 2 c_inv/(N h), and √(M₀₀ (M⁻¹)₀₀) ≤ √(2 c_inv (c_top + 1)).
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
rescaled_designMatrix_eqtheorem — For a kernel K and evaluation point x₀, as carried by a design, a positive sample size N, a positive bandwidth h and design points x_1, …, x_N, the weighted Gram matrix ∑_i K(u_i) u_i^(j+k) in the rescaled basis, u_i = (x_i − x₀)/h, equals N h times the empirical moment matrix.hypothesesconclusiondesignMatrix p (fun i => (x i - D.center) / h) (fun i => D.kernel ((x i - D.center) / h))= ((N : ℝ) * h) • empiricalMoment D p h xProof (Lean source)
theorem rescaled_designMatrix_eq (D : KernelDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hN : 0 < N) (hh : 0 < h) (x : Fin N → ℝ) : designMatrix p (fun i => (x i - D.center) / h) (fun i => D.kernel ((x i - D.center) / h)) = ((N : ℝ) * h) • empiricalMoment D p h x := by have hNh : (N : ℝ) * h ≠ 0 := mul_ne_zero (by exact_mod_cast hN.ne') hh.ne' ext j k simp only [designMatrix, empiricalMoment, momentSummand, Matrix.smul_apply, smul_eq_mul] field_simp -
unscaled_designMatrix_factortheorem — For a kernel K and evaluation point x₀, as carried by a design, a positive bandwidth h and design points x_1, …, x_N, the weighted design matrix ∑_i K(u_i) (x_i − x₀)^(j+k) equals D_h B D_h, where B has entries ∑_i K(u_i) u_i^(j+k), u_i = (x_i − x₀)/h, and D_h is the diagonal matrix of powers 1, h, …, h^p.hypothesesconclusiondesignMatrix p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h))= diagonal (fun j : Fin (p + 1) => h ^ (j : ℕ)) * designMatrix p (fun i => (x i - D.center) / h) (fun i => D.kernel ((x i - D.center) / h)) * diagonal (fun j : Fin (p + 1) => h ^ (j : ℕ))Proof (Lean source)
theorem unscaled_designMatrix_factor (D : KernelDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hh : 0 < h) (x : Fin N → ℝ) : designMatrix p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h)) = diagonal (fun j : Fin (p + 1) => h ^ (j : ℕ)) * designMatrix p (fun i => (x i - D.center) / h) (fun i => D.kernel ((x i - D.center) / h)) * diagonal (fun j : Fin (p + 1) => h ^ (j : ℕ)) := by ext j k simp only [Matrix.diagonal_mul, Matrix.mul_diagonal, designMatrix] rw [Finset.mul_sum, Finset.sum_mul] apply Finset.sum_congr rfl intro i _ rw [div_pow, div_pow] field_simp [hh.ne'] -
localPoly_goodDesign_of_momentEventtheorem — The moment event supplies the deterministic perturbation conditions. Let the design density f lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Take a positive sample size N, a positive bandwidth h not exceeding r, and design points x_1, …, x_N for which every empirical moment (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i = (x_i − x₀)/h, 0 ≤ j, k ≤ p, is within the design tolerance t₀ of its expectation. Write B for the Gram matrix ∑_i K(u_i) u_i^(j+k), T for the population matrix ∫ K(u) f(x₀ + h u) u^(j+k) du, η = N h t₀ and c = c_row/(N h). Then every row of (N h T)⁻¹ has absolute sum at most c, every entry of B − N h T is at most η in absolute value, c (p+1) η ≤ 1/2, and 2 c² (p+1) η ≤ c_inv/(N h).hypothesesD :p :ℕN :ℕh :ℝhN :0 < Nhh :0 < hhwindow :h ≤ D.radiusx :Fin N → ℝhx :x ∈ momentEvent D p h N (designTolerance D p)conclusionB :designMatrix p (fun i => (x i - D.center) / h) (fun i => D.kernel ((x i - D.center) / h))T :weightMomentMatrix p (fun u => D.kernel u * D.density (D.center + h * u))η :(N : ℝ) * h * designTolerance D pc :inverseRowConstant D p / ((N : ℝ) * h)i :(∑ j, |(((N : ℝ) * h) • T)⁻¹ i j|) ≤ cj k :|B j k - (N : ℝ) * h * T j k| ≤ ηc * ((p + 1 : ℝ) * η) ≤ 1 / 22 * c ^ 2 * ((p + 1 : ℝ) * η) ≤ inverseConstant D p / ((N : ℝ) * h)Proof (Lean source)
theorem localPoly_goodDesign_of_momentEvent (D : InteriorDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hN : 0 < N) (hh : 0 < h) (hwindow : h ≤ D.radius) (x : Fin N → ℝ) (hx : x ∈ momentEvent D p h N (designTolerance D p)) : let B := designMatrix p (fun i => (x i - D.center) / h) (fun i => D.kernel ((x i - D.center) / h)) let T := weightMomentMatrix p (fun u => D.kernel u * D.density (D.center + h * u)) let η := (N : ℝ) * h * designTolerance D p let c := inverseRowConstant D p / ((N : ℝ) * h) (∀ i, (∑ j, |(((N : ℝ) * h) • T)⁻¹ i j|) ≤ c) ∧ (∀ j k, |B j k - (N : ℝ) * h * T j k| ≤ η) ∧ c * ((p + 1 : ℝ) * η) ≤ 1 / 2 ∧ 2 * c ^ 2 * ((p + 1 : ℝ) * η) ≤ inverseConstant D p / ((N : ℝ) * h) := by classical dsimp only have hNh : 0 < (N : ℝ) * h := mul_pos (by exact_mod_cast hN) hh let := invertibleOfNonzero hNh.ne' obtain ⟨_, _, hsmall, hpert⟩ := designTolerance_spec D p refine ⟨?_, ?_, ?_, ?_⟩ · intro i rw [Matrix.inv_smul _ _ ((Matrix.isUnit_iff_isUnit_det _).mp (shapeMoment_posDef D p hh hwindow).isUnit)] simp only [Matrix.smul_apply, smul_eq_mul, invOf_eq_inv, abs_mul, abs_of_pos (inv_pos.mpr hNh), ← Finset.mul_sum] simpa only [div_eq_mul_inv, mul_comm] using mul_le_mul_of_nonneg_left (shape_inverse_rows D p hh hwindow i) (inv_nonneg.mpr hNh.le) · intro j k have hclose := hx j k rw [populationMoment_eq_shape D p hh] at hclose rw [rescaled_designMatrix_eq D p hN hh x] simp only [Matrix.smul_apply, smul_eq_mul, ← mul_sub, abs_mul, abs_of_pos hNh] exact mul_le_mul_of_nonneg_left hclose hNh.le · convert hsmall using 1 field_simp · apply (le_div_iff₀ hNh).mpr convert hpert using 1 <;> first | rfl | field_simp -
rawIntercept_eq_wls_intercepttheorem — On the moment event the estimator is the weighted least-squares intercept. Let the design density lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Take a positive sample size N, a positive bandwidth h not exceeding r, design points x_1, …, x_N for which every empirical moment (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i = (x_i − x₀)/h, 0 ≤ j, k ≤ p, is within the design tolerance of its expectation, and responses y_1, …, y_N. If coefficients c_0, …, c_p minimize the weighted sum of squares ∑_i K(u_i) (y_i − ∑_j c_j (x_i − x₀)^j)², then the weighted design matrix is invertible and the local-polynomial intercept ∑_i S_i y_i equals c_0.hypothesesD :p :ℕN :ℕh :ℝhN :0 < Nhh :0 < hhwindow :h ≤ D.radiusx :Fin N → ℝhx :x ∈ momentEvent D p h N (designTolerance D p)y :Fin N → ℝc :Fin (p + 1) → ℝhmin :∀ c' : Fin (p + 1) → ℝ,(∑ i, D.kernel ((x i - D.center) / h) * (y i - ∑ j, c j * (x i - D.center) ^ (j : ℕ)) ^ 2)≤ ∑ i, D.kernel ((x i - D.center) / h) * (y i - ∑ j, c' j * (x i - D.center) ^ (j : ℕ)) ^ 2conclusionconclusion 1IsUnit (designMatrix p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h))).detconclusion 2rawIntercept D p h x y = c 0Proof (Lean source)
theorem rawIntercept_eq_wls_intercept (D : InteriorDesign) (p : ℕ) {N : ℕ} {h : ℝ} (hN : 0 < N) (hh : 0 < h) (hwindow : h ≤ D.radius) (x : Fin N → ℝ) (hx : x ∈ momentEvent D p h N (designTolerance D p)) (y : Fin N → ℝ) {c : Fin (p + 1) → ℝ} (hmin : ∀ c' : Fin (p + 1) → ℝ, (∑ i, D.kernel ((x i - D.center) / h) * (y i - ∑ j, c j * (x i - D.center) ^ (j : ℕ)) ^ 2) ≤ ∑ i, D.kernel ((x i - D.center) / h) * (y i - ∑ j, c' j * (x i - D.center) ^ (j : ℕ)) ^ 2) : IsUnit (designMatrix p (fun i => x i - D.center) (fun i => D.kernel ((x i - D.center) / h))).det ∧ rawIntercept D p h x y = c 0 := by have hdet := (localPoly_leverage_on_momentEvent D p hN hh hwindow x hx).1 exact ⟨hdet, (wls_intercept_eq_equivKernelSmoother (fun i => D.kernel_nonneg _) hdet hmin).symm⟩
MomentConcentration 1 core · 8 supporting For independent design points with a density at most f_max near the evaluation point and a nonnegative kernel bounded by K_max and supported on [−1, 1], each normalized empirical moment (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i ★ localPoly_moment_simultaneous_probability
Concentration of kernel-weighted design moments in dimension one
For independent design points with a density at most f_max near the evaluation point and a
nonnegative kernel bounded by K_max and supported on [−1, 1], each normalized empirical
moment (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i = (X_i − x₀)/h, is close to its expectation.
Each summand is bounded by K_max and has second moment at most 2 h f_max K_max², so
Bernstein's inequality gives localPoly_moment_entrywise_bernstein: a deviation larger than t
has probability at most 2 exp(−N h t² / (4 (2 f_max K_max² + K_max t))). A union bound over
the (p+1)² entries gives localPoly_moment_simultaneous_probability. Only upper bounds on the
density and the kernel are used.
All kernel-weighted design moments are close at once, dimension one. Let the design points X_1, …, X_N be independent draws from a density that is at most f_max on an interval [x₀ − r, x₀ + r], and let the kernel K be measurable, nonnegative, at most K_max, and zero outside [−1, 1]. For a polynomial degree p, a positive sample size N, a positive bandwidth h not exceeding r and a positive tolerance t, consider the (p+1) × (p+1) matrix of empirical moments (N h)⁻¹ ∑_i K(u_i) u_i^(j+k), u_i = (X_i − x₀)/h. Then the probability that some entry differs from its expectation by more than t is at most 2 (p+1)² exp(−N h t² / (4 (2 f_max K_max² + K_max t))).
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
momentSummand_measurabletheorem — For a measurable kernel K and an evaluation point x₀, as carried by a design, the map x ↦ K(u) u^j u^k, u = (x − x₀)/h, is measurable for every bandwidth h and exponents j, k.Proof (Lean source)
@[fun_prop] theorem momentSummand_measurable (D : KernelDesign) (h : ℝ) (j k : ℕ) : Measurable (momentSummand D h j k) := by unfold momentSummand exact (D.kernel_measurable.comp ((measurable_id.sub_const D.center).div_const h)).mul ((((measurable_id.sub_const D.center).div_const h).pow_const j).mul (((measurable_id.sub_const D.center).div_const h).pow_const k)) -
momentSummand_abs_letheorem — For a nonnegative kernel K that is at most K_max and vanishes outside [−1, 1], with an evaluation point x₀, |K(u) u^j u^k| ≤ K_max for every bandwidth, pair of exponents and point x, where u = (x − x₀)/h.Proof (Lean source)
theorem momentSummand_abs_le (D : KernelDesign) (h : ℝ) (j k : ℕ) (x : ℝ) : |momentSummand D h j k x| ≤ D.kernelMax := by unfold momentSummand let u := (x - D.center) / h change |D.kernel u * (u ^ j * u ^ k)| ≤ D.kernelMax by_cases hu : |u| ≤ 1 · rw [abs_mul, abs_mul, abs_pow, abs_pow, abs_of_nonneg (D.kernel_nonneg u)] have hj : |u| ^ j ≤ 1 := pow_le_one₀ (abs_nonneg u) hu have hk : |u| ^ k ≤ 1 := pow_le_one₀ (abs_nonneg u) hu calc D.kernel u * (|u| ^ j * |u| ^ k) ≤ D.kernel u * (1 * 1) := by gcongr exact D.kernel_nonneg u _ ≤ D.kernelMax := by simpa using D.kernel_upper u · rw [D.kernel_support u (lt_of_not_ge hu)] simpa using D.kernelMax_nonneg -
momentSummand_integrabletheorem — For a design law with a measurable nonnegative kernel K ≤ K_max vanishing outside [−1, 1], the kernel-weighted monomial K(u) u^j u^k, u = (X − x₀)/h, has a finite expectation under the design law for every bandwidth and pair of exponents.Proof (Lean source)
theorem momentSummand_integrable (D : KernelDesign) (h : ℝ) (j k : ℕ) : Integrable (momentSummand D h j k) D.law := by let _ := D.probability exact (integrable_const D.kernelMax).mono' (momentSummand_measurable D h j k).aestronglyMeasurable (Filter.Eventually.of_forall fun x => by simpa [Real.norm_eq_abs] using momentSummand_abs_le D h j k x) -
momentSummand_secondMomenttheorem — Let the design density be at most f_max on [x₀ − r, x₀ + r] and the kernel K be measurable, nonnegative, at most K_max and zero outside [−1, 1]. For a positive bandwidth h not exceeding r, the second moment E[(K(u) u^j u^k)²], u = (X − x₀)/h, is at most 2 h f_max K_max² for all exponents j, k.hypothesesconclusion(∫ x, momentSummand D h j k x ^ 2 ∂D.law) ≤ 2 * h * D.upper * D.kernelMax ^ 2Proof (Lean source)
theorem momentSummand_secondMoment (D : KernelDesign) {h : ℝ} (hh : 0 < h) (hwindow : h ≤ D.radius) (j k : ℕ) : (∫ x, momentSummand D h j k x ^ 2 ∂D.law) ≤ 2 * h * D.upper * D.kernelMax ^ 2 := by classical have hu : 0 ≤ D.upper := D.upper_nonneg let W := Icc (D.center - h) (D.center + h) have hW : MeasurableSet W := measurableSet_Icc have hsq : ∀ x, momentSummand D h j k x ^ 2 ≤ D.kernelMax ^ 2 := by intro x have hb := momentSummand_abs_le D h j k x nlinarith [sq_abs (momentSummand D h j k x), abs_nonneg (momentSummand D h j k x)] have hout : ∀ x, x ∉ W → momentSummand D h j k x = 0 := by intro x hx have hx' : h < |x - D.center| := by by_contra hn have ha := abs_le.mp (le_of_not_gt hn) apply hx constructor <;> linarith [ha.1, ha.2] unfold momentSummand rw [D.kernel_support _ (by rw [abs_div, abs_of_pos hh] exact (lt_div_iff₀ hh).mpr (by simpa using hx'))] simp rw [D.law_density, integral_withDensity_eq_integral_toReal_smul D.density_measurable.ennreal_ofReal (Filter.Eventually.of_forall fun x => ENNReal.ofReal_lt_top)] simp only [ENNReal.toReal_ofReal (D.density_nonneg _), smul_eq_mul] calc (∫ x, D.density x * momentSummand D h j k x ^ 2) ≤ ∫ x, W.indicator (fun _ => D.upper * D.kernelMax ^ 2) x := by apply integral_mono_of_nonneg · exact Filter.Eventually.of_forall fun x => mul_nonneg (D.density_nonneg x) (sq_nonneg _) · exact (integrableOn_const (isCompact_Icc.measure_ne_top (μ := volume))).integrable_indicator hW · apply Filter.Eventually.of_forall intro x by_cases hx : x ∈ W · rw [Set.indicator_of_mem hx] have hxrad : |x - D.center| ≤ D.radius := by apply le_trans _ hwindow apply abs_le.mpr have hx' : D.center - h ≤ x ∧ x ≤ D.center + h := hx constructor <;> linarith [hx'.1, hx'.2] exact mul_le_mul (D.density_upper x hxrad) (hsq x) (sq_nonneg _) hu · simp [Set.indicator_of_notMem hx, hout x hx] _ = 2 * h * D.upper * D.kernelMax ^ 2 := by rw [integral_indicator hW, setIntegral_const] simp [W, hh.le] ring -
momentSummand_centered_boundtheorem — For a design law with a measurable nonnegative kernel K ≤ K_max vanishing outside [−1, 1], the kernel-weighted monomial K(u) u^j u^k, u = (x − x₀)/h, differs from its expectation under the design law by at most 2 K_max at every point x.hypothesesconclusion|momentSummand D h j k x - ∫ y, momentSummand D h j k y ∂D.law| ≤ 2 * D.kernelMaxProof (Lean source)
theorem momentSummand_centered_bound (D : KernelDesign) (h : ℝ) (j k : ℕ) : ∀ x, |momentSummand D h j k x - ∫ y, momentSummand D h j k y ∂D.law| ≤ 2 * D.kernelMax := by let _ := D.probability have hm : |∫ y, momentSummand D h j k y ∂D.law| ≤ D.kernelMax := by simpa [Real.norm_eq_abs] using (norm_integral_le_of_norm_le_const (μ := D.law) (f := momentSummand D h j k) (C := D.kernelMax) (Filter.Eventually.of_forall fun y => by simpa [Real.norm_eq_abs] using momentSummand_abs_le D h j k y)) intro x calc |momentSummand D h j k x - ∫ y, momentSummand D h j k y ∂D.law| ≤ |momentSummand D h j k x| + |∫ y, momentSummand D h j k y ∂D.law| := abs_sub _ _ _ ≤ D.kernelMax + D.kernelMax := add_le_add (momentSummand_abs_le D h j k x) hm _ = 2 * D.kernelMax := by ring -
momentSummand_variancetheorem — Let the design density be at most f_max on [x₀ − r, x₀ + r] and the kernel K be measurable, nonnegative, at most K_max and zero outside [−1, 1]. For a positive bandwidth h not exceeding r, the variance of K(u) u^j u^k, u = (X − x₀)/h, under the design law is at most 2 h f_max K_max² for all exponents j, k.hypothesesconclusion(∫ x, (momentSummand D h j k x - ∫ y, momentSummand D h j k y ∂D.law) ^ 2 ∂D.law)≤ 2 * h * D.upper * D.kernelMax ^ 2Proof (Lean source)
theorem momentSummand_variance (D : KernelDesign) {h : ℝ} (hh : 0 < h) (hwindow : h ≤ D.radius) (j k : ℕ) : (∫ x, (momentSummand D h j k x - ∫ y, momentSummand D h j k y ∂D.law) ^ 2 ∂D.law) ≤ 2 * h * D.upper * D.kernelMax ^ 2 := by let _ := D.probability rw [← ProbabilityTheory.variance_eq_integral (momentSummand_measurable D h j k).aemeasurable] exact (ProbabilityTheory.variance_le_expectation_sq (momentSummand_measurable D h j k).aestronglyMeasurable).trans (momentSummand_secondMoment D hh hwindow j k) -
localPoly_moment_entrywise_bernsteintheorem — Bernstein bound for one kernel-weighted design moment, dimension one. Let the design points X_1, …, X_N be independent draws from a density that is at most f_max on an interval [x₀ − r, x₀ + r], and let the kernel K be measurable, nonnegative, at most K_max, and zero outside [−1, 1]. For a polynomial degree p, a positive sample size N, a positive bandwidth h not exceeding r, a positive tolerance t and any two exponents j, k between 0 and p, write u_i = (X_i − x₀)/h and compare the empirical moment (N h)⁻¹ ∑_i K(u_i) u_i^(j+k) with its expectation. Then the probability that the two differ by more than t is at most 2 exp(−N h t² / (4 (2 f_max K_max² + K_max t))).hypothesesconclusion(Measure.pi (fun _ : Fin N => D.law)).real {x | t < |empiricalMoment D p h x j k - populationMoment D p h j k|}≤ 2 * exp (-(N : ℝ) * h * tailExponent D t)Proof (Lean source)
theorem localPoly_moment_entrywise_bernstein (D : KernelDesign) (p N : ℕ) {h t : ℝ} (hN : 0 < N) (hh : 0 < h) (hwindow : h ≤ D.radius) (ht : 0 < t) (j k : Fin (p + 1)) : (Measure.pi (fun _ : Fin N => D.law)).real {x | t < |empiricalMoment D p h x j k - populationMoment D p h j k|} ≤ 2 * exp (-(N : ℝ) * h * tailExponent D t) := by let _ := D.probability have hn : (0 : ℝ) < N := by exact_mod_cast hN have hK0 := D.kernelMax_nonneg by_cases hKz : D.kernelMax = 0 · have hz : ∀ x, momentSummand D h j k x = 0 := fun x => abs_eq_zero.mp (le_antisymm (hKz ▸ momentSummand_abs_le D h j k x) (abs_nonneg _)) have hempty : {x : Fin N → ℝ | t < |empiricalMoment D p h x j k - populationMoment D p h j k|} = ∅ := by ext x simp [empiricalMoment, populationMoment, hz, ht.le] rw [hempty, measureReal_empty] positivity have hK : 0 < D.kernelMax := lt_of_le_of_ne hK0 (Ne.symm hKz) have hu : 0 ≤ D.upper := D.upper_nonneg have htail := iid_sum_bernstein_union_bound (N := N) D.law (fun _ : Unit => momentSummand D h j k) (fun _ => momentSummand_measurable D h j k) (fun _ => momentSummand_integrable D h j k) (fun _ => 2 * D.kernelMax) (fun _ => 2 * h * D.upper * D.kernelMax ^ 2) (fun _ => (N : ℝ) * h * t) (fun _ => by positivity) (fun _ => by positivity) (fun _ => by positivity) hN (fun _ => Filter.Eventually.of_forall (momentSummand_centered_bound D h j k)) (fun _ => momentSummand_variance D hh hwindow j k) simp only [Finset.univ_unique, Finset.sum_singleton] at htail have hsub : {x : Fin N → ℝ | t < |empiricalMoment D p h x j k - populationMoment D p h j k|} ⊆ {x : Fin N → ℝ | ∃ _ : Unit, (N : ℝ) * h * t ≤ |(∑ i, momentSummand D h j k (x i)) - (N : ℝ) * ∫ y, momentSummand D h j k y ∂D.law|} := by intro x hx refine ⟨(), ?_⟩ have heq : empiricalMoment D p h x j k - populationMoment D p h j k = ((∑ i, momentSummand D h j k (x i)) - (N : ℝ) * ∫ y, momentSummand D h j k y ∂D.law) / ((N : ℝ) * h) := by unfold empiricalMoment populationMoment field_simp change t < |empiricalMoment D p h x j k - populationMoment D p h j k| at hx rw [heq, abs_div, abs_of_pos (mul_pos hn hh)] at hx have := (lt_div_iff₀ (mul_pos hn hh)).mp hx exact le_of_lt (by simpa [mul_comm, mul_left_comm, mul_assoc] using this) refine (measureReal_mono hsub).trans (htail.trans (le_of_eq ?_)) congr 2 unfold tailExponent field_simp ring -
momentEvent_measurabletheorem — For a design law with a measurable kernel, the set of design vectors (x_1, …, x_N) on which every empirical kernel moment of order up to 2p is within t of its expectation is measurable, for every degree p, sample size N, bandwidth h and tolerance t.Proof (Lean source)
theorem momentEvent_measurable (D : KernelDesign) (p N : ℕ) (h t : ℝ) : MeasurableSet (momentEvent D p h N t) := by classical unfold momentEvent simp only [Set.ofPred_forall] apply MeasurableSet.iInter intro j apply MeasurableSet.iInter intro k apply measurableSet_le _ measurable_const apply Measurable.abs apply Measurable.sub_const unfold empiricalMoment exact (Finset.measurable_sum _ (fun i _ => (momentSummand_measurable D h j k).comp (measurable_pi_apply i))).div_const _
PopulationMoment 2 core · 10 supporting The population counterpart of the normalized empirical moment matrix is, after the change of variables x = x₀ + h u, the matrix T with entries ∫ K(u) f(x₀ + h u) u^(j+k) du (populationMoment_eq_shape). ★ shapeMoment_posDef★ shape_inverse_rows
Population moment matrices of one-dimensional local-polynomial regression
The population counterpart of the normalized empirical moment matrix is, after the change of
variables x = x₀ + h u, the matrix T with entries ∫ K(u) f(x₀ + h u) u^(j+k) du
(populationMoment_eq_shape). Under density bounds f_min ≤ f ≤ f_max on the window and a
kernel bounded below by K_min on [−Δ, Δ], the quadratic form of T dominates f_min K_min
times that of the monomial moment matrix on [−Δ, Δ], which is positive definite because a
nonzero polynomial cannot vanish on an interval. Hence T and the kernel moment matrix are
positive definite (shapeMoment_posDef, kernelMoment_posDef), and every row of T⁻¹ has
absolute sum at most an explicit constant that does not depend on the bandwidth
(shape_inverse_rows).
designTolerance_spec records that the explicit tolerance is small enough for the deterministic
inverse-perturbation bounds. Continuity of the kernel is not assumed.
Let the design density f lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. For a positive bandwidth h not exceeding r, the population moment matrix with (j,k) entry ∫ K(u) f(x₀ + h u) u^(j+k) du, 0 ≤ j, k ≤ p, is positive definite.
Formal statement
Proof (Lean source)
Let the design density f lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. For a positive bandwidth h not exceeding r, let T be the population moment matrix with (j,k) entry ∫ K(u) f(x₀ + h u) u^(j+k) du. Then every row of T⁻¹ has absolute sum at most c_row = (p+1) tr(R⁻¹)/(f_min K_min), where R is the monomial moment matrix on [−Δ, Δ].
Formal statement
Proof (Lean source)
10 supporting declarations (lemmas, instances)
-
populationMoment_eq_shapetheorem — Change of variables for the population moments. Let the design law have a density f, and let K be the kernel and x₀ the evaluation point. For a positive bandwidth h, E[K(u) u^(j+k)] / h = ∫ K(v) f(x₀ + h v) v^(j+k) dv for all 0 ≤ j, k ≤ p, where u = (X − x₀)/h.hypothesesconclusionpopulationMoment D p h= weightMomentMatrix p (fun u => D.kernel u * D.density (D.center + h * u))Proof (Lean source)
theorem populationMoment_eq_shape (D : KernelDesign) (p : ℕ) {h : ℝ} (hh : 0 < h) : populationMoment D p h = weightMomentMatrix p (fun u => D.kernel u * D.density (D.center + h * u)) := by ext j k change (∫ x, momentSummand D h j k x ∂D.law) / h = ∫ u, (D.kernel u * D.density (D.center + h * u)) * (u ^ (j : ℕ) * u ^ (k : ℕ)) have hdensity : (∫ x, momentSummand D h j k x ∂D.law) = ∫ x, D.density x * momentSummand D h j k x := by rw [D.law_density] simpa only [ENNReal.toReal_ofReal (D.density_nonneg _), smul_eq_mul] using integral_withDensity_eq_integral_toReal_smul (μ := volume) D.density_measurable.ennreal_ofReal (Filter.Eventually.of_forall (fun x => ENNReal.ofReal_lt_top)) (momentSummand D h j k) have hcv : (∫ x, D.density x * momentSummand D h j k x) = h * ∫ u, (D.kernel u * D.density (D.center + h * u)) * (u ^ (j : ℕ) * u ^ (k : ℕ)) := by calc (∫ x, D.density x * momentSummand D h j k x) = ∫ x, (fun u => D.kernel u * (u ^ (j : ℕ) * u ^ (k : ℕ))) ((x - D.center) / h) * (x - D.center) ^ 0 * D.density x := by apply integral_congr_ae exact Filter.Eventually.of_forall (fun x => by simp only [momentSummand, pow_zero]; ring) _ = h ^ (0 + 1) * ∫ u, (D.kernel u * (u ^ (j : ℕ) * u ^ (k : ℕ))) * u ^ 0 * D.density (D.center + h * u) := popMomentEntry_changeOfVar (fun u => D.kernel u * (u ^ (j : ℕ) * u ^ (k : ℕ))) D.density D.center h hh 0 _ = h * ∫ u, (D.kernel u * D.density (D.center + h * u)) * (u ^ (j : ℕ) * u ^ (k : ℕ)) := by simp only [Nat.zero_add, pow_one, pow_zero, mul_one] congr 1 apply integral_congr_ae exact Filter.Eventually.of_forall (fun u => by ring) rw [hdensity, hcv] field_simp -
referenceMoment_posDeftheorem — For a kernel bounded below on an interval [−Δ, Δ] with Δ > 0, as carried by a design, the matrix with (j,k) entry ∫_{−Δ}^{Δ} u^(j+k) du, 0 ≤ j, k ≤ p, is positive definite for every degree p.Proof (Lean source)
theorem referenceMoment_posDef (D : InteriorDesign) (p : ℕ) : (referenceMoment D p).PosDef := by classical change (weightMomentMatrix p ((Icc (-D.subradius) D.subradius).indicator (fun _ => (1 : ℝ)))).PosDef apply Matrix.PosDef.of_dotProduct_mulVec_pos weightMomentMatrix_isHermitian intro v hv simp only [star_trivial] rw [weightMomentMatrix_quadForm (reference_moments_integrable D p) v] let f : ℝ → ℝ := fun u => (∑ i, v i * u ^ (i : ℕ)) ^ 2 have hc : Continuous f := by fun_prop have he : (fun u => (Icc (-D.subradius) D.subradius).indicator (fun _ => (1 : ℝ)) u * (∑ i, v i * u ^ (i : ℕ)) ^ 2) = (Icc (-D.subradius) D.subradius).indicator f := by funext u by_cases hu : u ∈ Icc (-D.subradius) D.subradius <;> simp [hu, f] rw [he, integral_indicator measurableSet_Icc] apply (setIntegral_pos_iff_support_of_nonneg_ae (Filter.Eventually.of_forall (fun u => sq_nonneg _)) hc.integrableOn_Icc).2 have hpoly : LocalPolynomial.localPolynomial p v ≠ 0 := by simpa [LocalPolynomial.localPolynomial_eq_zero_iff] using hv have hroots : Finite {u : ℝ | Polynomial.IsRoot (LocalPolynomial.localPolynomial p v) u} := (Polynomial.roots (LocalPolynomial.localPolynomial p v)).toFinset.finite_toSet.subset (by intro u hu simpa [Polynomial.mem_roots hpoly] using hu) have hinterval : Set.Infinite (Ioo (-D.subradius) D.subradius) := Set.Ioo_infinite (by linarith [D.subradius_pos]) obtain ⟨u, hu, hroot⟩ := (hinterval.sdiff hroots).nonempty have hne : (∑ i, v i * u ^ (i : ℕ)) ≠ 0 := by rw [← LocalPolynomial.localPolynomial_eval] intro hz exact hroot (by simpa [Polynomial.IsRoot] using hz) have hopen : IsOpen (support f ∩ Ioo (-D.subradius) D.subradius) := hc.isOpen_support.inter isOpen_Ioo have hnonempty : (support f ∩ Ioo (-D.subradius) D.subradius).Nonempty := ⟨u, pow_ne_zero 2 hne, hu⟩ exact lt_of_lt_of_le (hopen.measure_pos volume hnonempty) (measure_mono (by intro x hx exact ⟨hx.1, hx.2.1.le, hx.2.2.le⟩)) -
kernel_moments_integrabletheorem — For a measurable nonnegative kernel K that is at most K_max and vanishes outside [−1, 1], as carried by a design, u ↦ K(u) u^j u^k is integrable for all 0 ≤ j, k ≤ p.hypothesesconclusionIntegrable (fun u => D.kernel u * (u ^ (j : ℕ) * u ^ (k : ℕ)))Proof (Lean source)
theorem kernel_moments_integrable (D : KernelDesign) (p : ℕ) : ∀ j k : Fin (p + 1), Integrable (fun u => D.kernel u * (u ^ (j : ℕ) * u ^ (k : ℕ))) := by apply unit_moments_integrable (C := D.kernelMax) D.kernel_measurable _ D.kernel_support p intro u hu simpa [Real.norm_eq_abs, abs_of_nonneg (D.kernel_nonneg u)] using D.kernel_upper u -
shape_moments_integrabletheorem — Let the design density f be measurable and at most f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, at most K_max and zero outside [−1, 1]. For a positive bandwidth h not exceeding r, v ↦ K(v) f(x₀ + h v) v^j v^k is integrable for all 0 ≤ j, k ≤ p.hypothesesconclusionIntegrable (fun u => (D.kernel u * D.density (D.center + h * u)) * (u ^ (j : ℕ) * u ^ (k : ℕ)))Proof (Lean source)
theorem shape_moments_integrable (D : KernelDesign) (p : ℕ) {h : ℝ} (hh : 0 < h) (hwindow : h ≤ D.radius) : ∀ j k : Fin (p + 1), Integrable (fun u => (D.kernel u * D.density (D.center + h * u)) * (u ^ (j : ℕ) * u ^ (k : ℕ))) := by apply unit_moments_integrable (C := D.kernelMax * D.upper) (D.kernel_measurable.mul (D.density_measurable.comp (measurable_const.add (measurable_const.mul measurable_id)))) _ _ p · intro u hu change ‖D.kernel u * D.density (D.center + h * u)‖ ≤ D.kernelMax * D.upper rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (D.kernel_nonneg u) (D.density_nonneg _))] exact (kernelDensity_upper_dom hh D.kernel_nonneg D.kernel_support (fun a ha => D.density_upper a (ha.trans hwindow)) u).trans ((mul_comm _ _).le.trans (mul_le_mul_of_nonneg_right (D.kernel_upper u) D.upper_nonneg)) · intro u hu simp [D.kernel_support u hu] -
kernelMoment_posDeftheorem — For a measurable nonnegative bounded kernel K that vanishes outside [−1, 1] and is at least K_min > 0 on [−Δ, Δ], as carried by a design, the kernel moment matrix with (j,k) entry ∫ K(u) u^(j+k) du, 0 ≤ j, k ≤ p, is positive definite for every degree p.Proof (Lean source)
theorem kernelMoment_posDef (D : InteriorDesign) (p : ℕ) : (weightMomentMatrix p D.kernel).PosDef := by apply Matrix.PosDef.of_dotProduct_mulVec_pos weightMomentMatrix_isHermitian intro v hv simp only [star_trivial] have href : 0 < v ⬝ᵥ (referenceMoment D p *ᵥ v) := by simpa only [star_trivial] using (referenceMoment_posDef D p).dotProduct_mulVec_pos hv apply lt_of_lt_of_le (mul_pos D.kernelMin_pos href) apply weightMomentMatrix_quadForm_sandwich D.kernelMin_pos.le (kernel_moments_integrable D p) (reference_moments_integrable D p) intro u by_cases hu : u ∈ Icc (-D.subradius) D.subradius · simpa [hu] using D.kernel_lower u (abs_le.mpr hu) · simpa [hu] using D.kernel_nonneg u -
shape_dominates_referencetheorem — Let the design density f lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. For a positive bandwidth h not exceeding r, every vector v satisfies f_min K_min · vᵀ R v ≤ vᵀ T v, where T has (j,k) entry ∫ K(u) f(x₀ + h u) u^(j+k) du and R has (j,k) entry ∫_{−Δ}^{Δ} u^(j+k) du.hypothesesconclusion(D.lower * D.kernelMin) * (v ⬝ᵥ (referenceMoment D p *ᵥ v))≤ v ⬝ᵥ (weightMomentMatrix p (fun u => D.kernel u * D.density (D.center + h * u)) *ᵥ v)Proof (Lean source)
theorem shape_dominates_reference (D : InteriorDesign) (p : ℕ) {h : ℝ} (hh : 0 < h) (hwindow : h ≤ D.radius) : ∀ v : Fin (p + 1) → ℝ, (D.lower * D.kernelMin) * (v ⬝ᵥ (referenceMoment D p *ᵥ v)) ≤ v ⬝ᵥ (weightMomentMatrix p (fun u => D.kernel u * D.density (D.center + h * u)) *ᵥ v) := by apply weightMomentMatrix_quadForm_sandwich (mul_pos D.lower_pos D.kernelMin_pos).le (shape_moments_integrable D p hh hwindow) (reference_moments_integrable D p) intro u have hdom := kernelDensity_lower_dom hh D.kernel_nonneg D.kernel_support (fun a ha => D.density_lower a (ha.trans hwindow)) u refine le_trans ?_ hdom rw [mul_assoc] refine mul_le_mul_of_nonneg_left ?_ D.lower_pos.le by_cases hu : u ∈ Icc (-D.subradius) D.subradius · simpa [hu] using D.kernel_lower u (abs_le.mpr hu) · simpa [hu] using D.kernel_nonneg u -
posSemidef_abs_entry_le_tracetheorem — If a real square matrix A is positive semidefinite, then every entry satisfies |A_{ij}| ≤ tr A.hypothesesconclusion|A i j| ≤ ∑ k, A k kProof (Lean source)
theorem posSemidef_abs_entry_le_trace {p : ℕ} {A : Matrix (Fin (p + 1)) (Fin (p + 1)) ℝ} (hA : A.PosSemidef) (i j : Fin (p + 1)) : |A i j| ≤ ∑ k, A k k := by have hdiag : ∀ k, 0 ≤ A k k := fun _ => hA.diag_nonneg by_cases hij : i = j · subst j rw [abs_of_nonneg (hdiag i)] exact Finset.single_le_sum (fun k _ => hdiag k) (Finset.mem_univ i) have hsym : A j i = A i j := by have h := congr_fun₂ hA.isHermitian.eq i j simpa [conjTranspose] using h have hplus := hA.dotProduct_mulVec_nonneg (single i 1 + single j 1) have hminus := hA.dotProduct_mulVec_nonneg (single i 1 - single j 1) have hp : 0 ≤ A i i + A i j + A j i + A j j := by simpa [Matrix.mulVec_add, dotProduct_add, add_dotProduct, add_assoc, hsym] using hplus have hm : 0 ≤ A i i - A i j - (A j i - A j j) := by simpa [Matrix.mulVec_sub, dotProduct_sub, sub_dotProduct, hsym] using hminus have hpair : A i i + A j j ≤ ∑ k, A k k := by have h := Finset.sum_le_univ_sum_of_nonneg (s := {i, j}) hdiag simpa [hij] using h have habs : |A i j| ≤ (A i i + A j j) / 2 := by rw [abs_le] constructor <;> linarith [hsym] linarith [hdiag i, hdiag j] -
designConstants_positivetheorem — Let the design density lie between f_min > 0 and f_max near the evaluation point, and the kernel K be measurable, nonnegative, bounded, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Then for every polynomial degree p, the constants c_row = (p+1) tr(R⁻¹)/(f_min K_min) and c_inv = (G⁻¹)₀₀/f_min are positive and c_top = f_max ∫ K(u) du is nonnegative, where R is the monomial moment matrix on [−Δ, Δ] and G the kernel moment matrix.hypothesesD :p :ℕconclusionconclusion 10 < inverseRowConstant D pconclusion 20 < inverseConstant D pconclusion 30 ≤ topConstant DProof (Lean source)
theorem designConstants_positive (D : InteriorDesign) (p : ℕ) : 0 < inverseRowConstant D p ∧ 0 < inverseConstant D p ∧ 0 ≤ topConstant D := by have htrace : 0 < ∑ j, (referenceMoment D p)⁻¹ j j := (referenceMoment_posDef D p).inv.trace_pos have hdim : 0 < (p + 1 : ℝ) := by positivity refine ⟨?_, ?_, ?_⟩ · exact div_pos (mul_pos hdim htrace) (mul_pos D.lower_pos D.kernelMin_pos) · exact div_pos (kernelMoment_posDef D p).inv.diag_pos D.lower_pos · rw [topConstant] exact mul_nonneg (D.lower_pos.le.trans D.lower_le_upper) (integral_nonneg fun u => D.kernel_nonneg u) -
designTolerance_spectheorem — Let the design density lie between f_min > 0 and f_max near the evaluation point, and the kernel be measurable, nonnegative, bounded, zero outside [−1, 1] and bounded below on [−Δ, Δ]. Then for every polynomial degree p, the tolerance t₀ = min(1, 1/(2 (p+1) c_row), c_inv/(2 (p+1) c_row²)) satisfies 0 < t₀ ≤ 1, c_row (p+1) t₀ ≤ 1/2 and 2 c_row² (p+1) t₀ ≤ c_inv.hypothesesD :p :ℕconclusionconclusion 10 < designTolerance D pconclusion 2designTolerance D p ≤ 1conclusion 3inverseRowConstant D p * ((p + 1 : ℝ) * designTolerance D p) ≤ 1 / 2conclusion 4Proof (Lean source)
theorem designTolerance_spec (D : InteriorDesign) (p : ℕ) : 0 < designTolerance D p ∧ designTolerance D p ≤ 1 ∧ inverseRowConstant D p * ((p + 1 : ℝ) * designTolerance D p) ≤ 1 / 2 ∧ 2 * inverseRowConstant D p ^ 2 * ((p + 1 : ℝ) * designTolerance D p) ≤ inverseConstant D p := by obtain ⟨hrow, hinv, _⟩ := designConstants_positive D p have hdim : 0 < (p + 1 : ℝ) := by positivity have hden₁ : 0 < 2 * (p + 1 : ℝ) * inverseRowConstant D p := by positivity have hden₂ : 0 < 2 * (p + 1 : ℝ) * inverseRowConstant D p ^ 2 := by positivity have hfirst : designTolerance D p ≤ 1 / (2 * (p + 1 : ℝ) * inverseRowConstant D p) := (min_le_right _ _).trans (min_le_left _ _) have hsecond : designTolerance D p ≤ inverseConstant D p / (2 * (p + 1 : ℝ) * inverseRowConstant D p ^ 2) := (min_le_right _ _).trans (min_le_right _ _) refine ⟨?_, min_le_left _ _, ?_, ?_⟩ · exact lt_min (by norm_num) (lt_min (div_pos (by norm_num) hden₁) (div_pos hinv hden₂)) · have h := (le_div_iff₀ hden₁).mp hfirst nlinarith · have h := (le_div_iff₀ hden₂).mp hsecond nlinarith -
tailExponent_postheorem — Let the design density lie between f_min > 0 and f_max near the evaluation point and the kernel be bounded by K_max and bounded below by K_min > 0 on [−Δ, Δ]. For a positive tolerance t, t² / (4 (2 f_max K_max² + K_max t)) > 0.Proof (Lean source)
theorem tailExponent_pos (D : InteriorDesign) {t : ℝ} (ht : 0 < t) : 0 < tailExponent D t := by unfold tailExponent have hu : 0 < D.upper := lt_of_lt_of_le D.lower_pos D.lower_le_upper have hw : 0 < D.kernelMax := D.kernelMax_pos positivity
Rate 4 core · 5 supporting With the bandwidth h = N^(−1/(2β+1)) the squared-bias term h^(2β) and the variance term 1/(N h) both equal N^(−2β/(2β+1)), and the exponentially small design-failure term is at most a constant times the same power. ★ localPoly_clipped_pointwise_rate
Pointwise rate of the clipped local-polynomial estimator, dimension one
With the bandwidth h = N^(−1/(2β+1)) the squared-bias term h^(2β) and the variance term
1/(N h) both equal N^(−2β/(2β+1)), and the exponentially small design-failure term is at
most a constant times the same power. localPoly_clipped_pointwise_rate concludes that, once
N ≥ max(1, ⌈r^(−(2β+1))⌉) so that the bandwidth fits inside the window on which the design
density is bounded, the clipped local-polynomial intercept has mean-squared error at most an
explicit constant times N^(−2β/(2β+1)).
This is an upper bound, for the clipped estimator, in dimension one, at exactly this bandwidth.
For a smoothness β and a sample size N, the balancing bandwidth in dimension one is h = N^(−1/(2β+1)), the bandwidth at which the squared-bias term h^(2β) and the variance term 1/(N h) are equal.
Definition (Lean source)
For a design whose density bounds hold on [x₀ − r, x₀ + r] and a smoothness β, the sample-size threshold is max(1, ⌈r^(−(2β+1))⌉), the smallest sample size from which the bandwidth N^(−1/(2β+1)) is at most r.
Definition (Lean source)
For a design with density bounds f_min ≤ f_max near the evaluation point and a kernel bounded above and, on [−Δ, Δ], below, a smoothness β, a Hölder constant H, a clipping level M and a noise scale σ, the pointwise rate constant is C = C_bias² + C_var + 16 M² (p+1)² / c₀, where p = ⌈β⌉ − 1, C_bias and C_var are the bias and variance constants, and c₀ is the Bernstein exponent at the design tolerance.
Definition (Lean source)
Pointwise rate N^(−2β/(2β+1)) for the clipped local-polynomial estimator at an interior point, dimension one. Let the design density lie between positive constants f_min ≤ f_max on an interval [x₀ − r, x₀ + r], and let the kernel K be measurable, nonnegative, at most K_max, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Suppose for some β > 0 and p = ⌈β⌉ − 1 the regression function m is, on that interval, p times continuously differentiable with p-th derivative Hölder of order β − p and constant H, the sample size satisfies N ≥ max(1, ⌈r^(−(2β+1))⌉), and the clipping level M satisfies |m(x₀)| ≤ M. Let (X_i, Y_i), i = 1, …, N, be independent pairs with X_i drawn from the design density and Y_i drawn, given X_i, from a conditional outcome distribution that at almost every design point x in that interval has a finite second moment, mean m(x) and variance at most σ². Then the degree-p kernel-weighted least-squares intercept at x₀ with bandwidth h = N^(−1/(2β+1)) (taken to be zero when the weighted design matrix is singular), clipped to [−M, M], satisfies E[(m̂(x₀) − m(x₀))²] ≤ C · N^(−2β/(2β+1)) with C = C_bias² + C_var + 16 M² (p+1)² / c₀, an explicit function of f_min, f_max, K_min, K_max, Δ, the kernel moments, p, H, σ and M that does not depend on N.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
balancingBandwidth_eqtheorem — The balancing bandwidth for smoothness β and sample size N equals N^(−1/(2β+1)).Proof (Lean source)
theorem balancingBandwidth_eq (β : ℝ) (N : ℕ) : balancingBandwidth β N = (N : ℝ) ^ (-(1 / (2 * β + 1))) := by simp [balancingBandwidth, HistogramRegression.optimizedBandwidth] -
balancingBandwidth_power_identitiestheorem — For a positive smoothness β and a positive sample size N, the bandwidth h = N^(−1/(2β+1)) satisfies h^(2β) = N^(−2β/(2β+1)) and 1/(N h) = N^(−2β/(2β+1)).hypothesesβ :ℝhβ :0 < βN :ℕhN :0 < Nconclusionconclusion 1balancingBandwidth β N ^ (2 * β) = (N : ℝ) ^ (-(2 * β / (2 * β + 1)))conclusion 21 / ((N : ℝ) * balancingBandwidth β N) = (N : ℝ) ^ (-(2 * β / (2 * β + 1)))Proof (Lean source)
theorem balancingBandwidth_power_identities {β : ℝ} (hβ : 0 < β) {N : ℕ} (hN : 0 < N) : balancingBandwidth β N ^ (2 * β) = (N : ℝ) ^ (-(2 * β / (2 * β + 1))) ∧ 1 / ((N : ℝ) * balancingBandwidth β N) = (N : ℝ) ^ (-(2 * β / (2 * β + 1))) := by simpa [balancingBandwidth] using HistogramRegression.optimized_power_identities 1 β N hβ hN -
balancingBandwidth_spectheorem — Let the design window be [x₀ − r, x₀ + r] with r > 0. For a positive smoothness β and a sample size N ≥ max(1, ⌈r^(−(2β+1))⌉), N is positive and the bandwidth h = N^(−1/(2β+1)) satisfies 0 < h ≤ r.hypothesesconclusionconclusion 10 < Nconclusion 20 < balancingBandwidth β Nconclusion 3balancingBandwidth β N ≤ D.radiusProof (Lean source)
theorem balancingBandwidth_spec (D : InteriorDesign) {β : ℝ} (hβ : 0 < β) {N : ℕ} (hN : rateThreshold D β ≤ N) : 0 < N ∧ 0 < balancingBandwidth β N ∧ balancingBandwidth β N ≤ D.radius := by have hNpos : 0 < N := lt_of_lt_of_le Nat.zero_lt_one ((le_max_left _ _).trans hN) have hNreal : 0 < (N : ℝ) := by exact_mod_cast hNpos have hden : 0 < 2 * β + 1 := by linarith have hceil : ⌈D.radius ^ (-(2 * β + 1))⌉₊ ≤ N := (le_max_right _ _).trans hN have hrN : D.radius ^ (-(2 * β + 1)) ≤ (N : ℝ) := (Nat.le_ceil _).trans (by exact_mod_cast hceil) refine ⟨hNpos, ?_, ?_⟩ <;> rw [balancingBandwidth_eq] · exact Real.rpow_pos_of_pos hNreal _ · calc (N : ℝ) ^ (-(1 / (2 * β + 1))) ≤ (D.radius ^ (-(2 * β + 1))) ^ (-(1 / (2 * β + 1))) := Real.rpow_le_rpow_of_nonpos (Real.rpow_pos_of_pos D.radius_pos _) hrN (neg_nonpos.mpr (le_of_lt (one_div_pos.mpr hden))) _ = D.radius := by rw [← Real.rpow_mul D.radius_pos.le] have hexp : -(2 * β + 1) * -(1 / (2 * β + 1)) = 1 := by field_simp rw [hexp, Real.rpow_one] -
balancing_failureBound_letheorem — Let the design density lie between f_min > 0 and f_max near the evaluation point, and the kernel be measurable, nonnegative, bounded, zero outside [−1, 1] and bounded below on [−Δ, Δ]. For a positive smoothness β with p = ⌈β⌉ − 1, and a positive sample size N, at the bandwidth h = N^(−1/(2β+1)) the failure bound satisfies 2 (p+1)² exp(−c₀ N h) ≤ (2 (p+1)² / c₀) · N^(−2β/(2β+1)), where c₀ > 0 is the Bernstein exponent at the design tolerance.hypothesesconclusionfailureBound D (holderDerivOrder β) N (balancingBandwidth β N) (designTolerance D (holderDerivOrder β))≤ (2 * (holderDerivOrder β + 1 : ℝ) ^ 2 / tailExponent D (designTolerance D (holderDerivOrder β))) * (N : ℝ) ^ (-(2 * β / (2 * β + 1)))Proof (Lean source)
theorem balancing_failureBound_le (D : InteriorDesign) {β : ℝ} (hβ : 0 < β) {N : ℕ} (hN : 0 < N) : failureBound D (holderDerivOrder β) N (balancingBandwidth β N) (designTolerance D (holderDerivOrder β)) ≤ (2 * (holderDerivOrder β + 1 : ℝ) ^ 2 / tailExponent D (designTolerance D (holderDerivOrder β))) * (N : ℝ) ^ (-(2 * β / (2 * β + 1))) := by have hNreal : 0 < (N : ℝ) := by exact_mod_cast hN let a := tailExponent D (designTolerance D (holderDerivOrder β)) have ha : 0 < a := tailExponent_pos D (designTolerance_spec D _).1 have hs : 0 < (N : ℝ) * balancingBandwidth β N := by rw [balancingBandwidth_eq] exact mul_pos hNreal (Real.rpow_pos_of_pos hNreal _) have hrecip := (balancingBandwidth_power_identities hβ hN).2 have hexp : exp (-((N : ℝ) * balancingBandwidth β N * a)) ≤ 1 / ((N : ℝ) * balancingBandwidth β N * a) := by rw [Real.exp_neg, ← one_div] apply one_div_le_one_div_of_le (mul_pos hs ha) linarith [Real.add_one_le_exp ((N : ℝ) * balancingBandwidth β N * a)] unfold failureBound change 2 * (holderDerivOrder β + 1 : ℝ) ^ 2 * exp (-(N : ℝ) * balancingBandwidth β N * a) ≤ (2 * (holderDerivOrder β + 1 : ℝ) ^ 2 / a) * (N : ℝ) ^ (-(2 * β / (2 * β + 1))) rw [show -(N : ℝ) * balancingBandwidth β N * a = -((N : ℝ) * balancingBandwidth β N * a) by ring] calc _ ≤ 2 * (holderDerivOrder β + 1 : ℝ) ^ 2 * (1 / ((N : ℝ) * balancingBandwidth β N * a)) := mul_le_mul_of_nonneg_left hexp (by positivity) _ = (2 * (holderDerivOrder β + 1 : ℝ) ^ 2 / a) * (1 / ((N : ℝ) * balancingBandwidth β N)) := by ring _ = _ := by rw [hrecip] -
localPoly_clipped_pointwise_rate_of_contDifftheorem — Pointwise rate N^(−2β/(2β+1)) of the clipped local-polynomial estimator for a globally smooth regression function, dimension one. Let the design density lie between positive constants f_min ≤ f_max on an interval [x₀ − r, x₀ + r], and let the kernel K be measurable, nonnegative, at most K_max, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Suppose β > 0, H ≥ 0, the regression function m is p = ⌈β⌉ − 1 times continuously differentiable on the whole real line, and its p-th derivative satisfies |m⁽ᵖ⁾(x) − m⁽ᵖ⁾(y)| ≤ H |x − y|^(β − p) for all x, y in that interval. Suppose also the sample size satisfies N ≥ max(1, ⌈r^(−(2β+1))⌉) and the clipping level M satisfies |m(x₀)| ≤ M. Let (X_i, Y_i), i = 1, …, N, be independent pairs with X_i drawn from the design density and Y_i drawn, given X_i, from a conditional outcome distribution that at almost every design point x has a finite second moment, mean m(x) and variance at most σ². Then the degree-p kernel-weighted least-squares intercept at x₀ with bandwidth h = N^(−1/(2β+1)) (taken to be zero when the weighted design matrix is singular), clipped to [−M, M], satisfies E[(m̂(x₀) − m(x₀))²] ≤ C · N^(−2β/(2β+1)) with the same constant C = C_bias² + C_var + 16 M² (p+1)² / c₀ as in the version with assumptions on the interval only.hypothesesD :β H M σ :ℝN :ℕm :ℝ → ℝhβ :0 < βhH :0 ≤ Hhm :ContDiff ℝ (holderDerivOrder β) mhb :∀ x ∈ Icc (D.center - D.radius) (D.center + D.radius),∀ y ∈ Icc (D.center - D.radius) (D.center + D.radius),|iteratedDeriv (holderDerivOrder β) m x - iteratedDeriv (holderDerivOrder β) m y|≤ H * |x - y| ^ (β - (holderDerivOrder β : ℝ))hN :rateThreshold D β ≤ NhM :|m D.center| ≤ Mκ :Kernel ℝ ℝconclusion(∫ z : Fin N → ℝ × ℝ, (clippedIntercept D (holderDerivOrder β) (balancingBandwidth β N) M (fun i => (z i).1) (fun i => (z i).2) - m D.center) ^ 2 ∂Measure.pi (fun _ : Fin N => D.law ⊗ₘ κ))≤ pointwiseRateConstant D β H M σ * (N : ℝ) ^ (-(2 * β / (2 * β + 1)))Proof (Lean source)
theorem localPoly_clipped_pointwise_rate_of_contDiff (D : InteriorDesign) {β H M σ : ℝ} {N : ℕ} {m : ℝ → ℝ} (hβ : 0 < β) (hH : 0 ≤ H) (hm : ContDiff ℝ (holderDerivOrder β) m) (hb : ∀ x ∈ Icc (D.center - D.radius) (D.center + D.radius), ∀ y ∈ Icc (D.center - D.radius) (D.center + D.radius), |iteratedDeriv (holderDerivOrder β) m x - iteratedDeriv (holderDerivOrder β) m y| ≤ H * |x - y| ^ (β - (holderDerivOrder β : ℝ))) (hN : rateThreshold D β ≤ N) (hM : |m D.center| ≤ M) (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] (hnoise : ∀ᵐ x ∂D.law, MemLp (fun y : ℝ => y) 2 (κ x) ∧ (∫ y, y ∂κ x) = m x ∧ Var[fun y : ℝ => y; κ x] ≤ σ ^ 2) : (∫ z : Fin N → ℝ × ℝ, (clippedIntercept D (holderDerivOrder β) (balancingBandwidth β N) M (fun i => (z i).1) (fun i => (z i).2) - m D.center) ^ 2 ∂Measure.pi (fun _ : Fin N => D.law ⊗ₘ κ)) ≤ pointwiseRateConstant D β H M σ * (N : ℝ) ^ (-(2 * β / (2 * β + 1))) := localPoly_clipped_pointwise_rate D (HolderRegression.of_contDiff D.center D.radius D.radius_pos hβ hH hm hb) hN hM κ (hnoise.mono fun _ hx _ => hx)
Risk 1 core · 4 supporting localPoly_clipped_mse_unconditional: at an interior point x₀, for independent pairs (X_i, Y_i) whose design density is bounded above and below near x₀, a regression function in a local Hölder class of smoothness β, and r ★ localPoly_clipped_mse_unconditional
Unconditional mean-squared error of the clipped local-polynomial estimator, dimension one
localPoly_clipped_mse_unconditional: at an interior point x₀, for independent pairs
(X_i, Y_i) whose design density is bounded above and below near x₀, a regression function in
a local Hölder class of smoothness β, and responses with conditional variance at most σ²,
the degree-p local-polynomial intercept (p = ⌈β⌉ − 1) clipped to [−M, M], where
|m(x₀)| ≤ M, has mean-squared error at most
C_bias² h^(2β) + C_var/(N h) + 16 M² (p+1)² exp(−c₀ N h).
The event that the empirical kernel moments are close to their expectations is constructed, not
assumed: on it the conditional mean-squared error is at most the first two terms, and its
complement has probability at most 2 (p+1)² exp(−c₀ N h). A bounded estimator's squared loss
is lifted from the event to the whole sample at the cost of 8 M² times the probability of the
complement (bounded_fibre_mse_lift). The result is an upper bound for the clipped estimator;
neither the responses nor the regression function need be bounded.
Unconditional mean-squared error of the clipped local-polynomial estimator at an interior point, dimension one. Let the design density lie between positive constants f_min ≤ f_max on an interval [x₀ − r, x₀ + r], and let the kernel K be measurable, nonnegative, at most K_max, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Suppose for some β > 0 and p = ⌈β⌉ − 1 the regression function m is, on that interval, p times continuously differentiable with p-th derivative Hölder of order β − p and constant H, the sample size N is positive, the bandwidth h is positive and at most r, and the clipping level M satisfies |m(x₀)| ≤ M. Let (X_i, Y_i), i = 1, …, N, be independent pairs with X_i drawn from the design density and Y_i drawn, given X_i, from a conditional outcome distribution that at almost every design point x in that interval has a finite second moment, mean m(x) and variance at most σ². Then the degree-p kernel-weighted least-squares intercept at x₀ (taken to be zero when the weighted design matrix is singular), clipped to [−M, M], satisfies E[(m̂(x₀) − m(x₀))²] ≤ C_bias² h^(2β) + C_var/(N h) + 16 M² (p+1)² exp(−c₀ N h), where C_bias, C_var and c₀ > 0 are explicit functions of f_min, f_max, K_min, K_max, Δ, the kernel moments, p, H and σ that do not depend on N or h.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
bounded_fibre_mse_lifttheorem — From a good-design event to the unconditional mean-squared error. Let the design X have a probability law and the response Y be drawn, given X, from a conditional distribution. Let a measurable estimator θ̂(X, Y) be bounded by M in absolute value, let the target θ satisfy |θ| ≤ M, and let R ≥ 0. If on a measurable set G of designs the conditional mean-squared error E[(θ̂ − θ)² | X] is at most R for almost every design in G, then E[(θ̂ − θ)²] ≤ R + 8 M² · P(X ∉ G).hypothesesA B :P :κ :Kernel A Best :A × B → ℝhmeas :Measurable estG :Set AhG :θ M R :ℝhθ :|θ| ≤ MhR :0 ≤ Rhbound :∀ z, |est z| ≤ Mhgood :∀ᵐ x ∂P, x ∈ G → (∫ y, (est (x, y) - θ) ^ 2 ∂κ x) ≤ Rconclusion(∫ z, (est z - θ) ^ 2 ∂(P ⊗ₘ κ)) ≤ R + 8 * M ^ 2 * P.real GᶜProof (Lean source)
theorem bounded_fibre_mse_lift {A B : Type*} [MeasurableSpace A] [MeasurableSpace B] (P : Measure A) [IsProbabilityMeasure P] (κ : Kernel A B) [IsMarkovKernel κ] (est : A × B → ℝ) (hmeas : Measurable est) {G : Set A} (hG : MeasurableSet G) {θ M R : ℝ} (hθ : |θ| ≤ M) (hR : 0 ≤ R) (hbound : ∀ z, |est z| ≤ M) (hgood : ∀ᵐ x ∂P, x ∈ G → (∫ y, (est (x, y) - θ) ^ 2 ∂κ x) ≤ R) : (∫ z, (est z - θ) ^ 2 ∂(P ⊗ₘ κ)) ≤ R + 8 * M ^ 2 * P.real Gᶜ := by let loss : A × B → ℝ := fun z => (est z - θ) ^ 2 have hloss : Measurable loss := (hmeas.sub_const θ).pow_const 2 have hloss_bound : ∀ z, |loss z| ≤ 4 * M ^ 2 := by intro z have he := abs_le.mp (hbound z) have ht := abs_le.mp hθ have hM : 0 ≤ M := (abs_nonneg θ).trans hθ dsimp only [loss] rw [abs_of_nonneg (sq_nonneg _)] nlinarith [sq_nonneg (est z - θ + 2 * M), sq_nonneg (2 * M - (est z - θ)), mul_nonneg (show 0 ≤ 2 * M - (est z - θ) by linarith) (show 0 ≤ 2 * M + (est z - θ) by linarith)] have hloss_int : Integrable loss (P ⊗ₘ κ) := (integrable_const (4 * M ^ 2)).mono' hloss.aestronglyMeasurable (Filter.Eventually.of_forall fun z => by simpa only [Real.norm_eq_abs] using hloss_bound z) let F : A → ℝ := fun x => ∫ y, loss (x, y) ∂κ x have hFmeas : StronglyMeasurable F := hloss.stronglyMeasurable.integral_kernel_prod_right' have hFnonneg : ∀ x, 0 ≤ F x := fun x => integral_nonneg (fun y => sq_nonneg _) have hFbound : ∀ x, |F x| ≤ 4 * M ^ 2 := by intro x have hb := norm_integral_le_of_norm_le_const (μ := κ x) (f := fun y => loss (x, y)) (C := 4 * M ^ 2) (Filter.Eventually.of_forall fun y => by simpa only [Real.norm_eq_abs] using hloss_bound (x, y)) simpa only [Real.norm_eq_abs, probReal_univ, mul_one] using hb have hFint : Integrable F P := (integrable_const (4 * M ^ 2)).mono' hFmeas.aestronglyMeasurable (Filter.Eventually.of_forall fun x => by simpa only [Real.norm_eq_abs] using hFbound x) have hcond : ∀ᵐ x ∂P, x ∈ G → |(P[F | ‹MeasurableSpace A›]) x - 0| ≤ R := by rw [condExp_of_stronglyMeasurable le_rfl hFmeas hFint] filter_upwards [hgood] with x hx hxG simpa only [sub_zero, abs_of_nonneg (hFnonneg x)] using hx hxG have hb := estimatorBias_unconditional (μ := P) (m := ‹MeasurableSpace A›) (est := F) (θ := 0) (B := R) (M := 4 * M ^ 2) le_rfl hFint hFbound (by simpa using mul_nonneg (by norm_num : (0 : ℝ) ≤ 4) (sq_nonneg M)) hR hG hcond rw [Measure.integral_compProd hloss_int] change (∫ x, F x ∂P) ≤ _ exact (le_abs_self _).trans (by simpa only [sub_zero, Measure.real, show (2 : ℝ) * (4 * M ^ 2) = 8 * M ^ 2 by ring] using hb) -
clippedIntercept_iid_risk_eqtheorem — Let the design law, kernel and evaluation point be given and let the response be drawn, given the design point, from a conditional outcome distribution. Then for every degree, sample size, bandwidth, clipping level and target, the expected squared error of the clipped local-polynomial intercept over N independent pairs (X_i, Y_i) equals its expected squared error when the N design points are drawn first, independently, and the responses are then drawn independently given the design points.hypothesesconclusion(∫ z : Fin N → ℝ × ℝ, (clippedIntercept D p h M (fun i => (z i).1) (fun i => (z i).2) - θ) ^ 2 ∂Measure.pi (fun _ : Fin N => D.law ⊗ₘ κ))= ∫ z : (Fin N → ℝ) × (Fin N → ℝ), (clippedIntercept D p h M z.1 z.2 - θ) ^ 2 ∂(Measure.pi (fun _ : Fin N => D.law) ⊗ₘ finProductKernel N κ)Proof (Lean source)
theorem clippedIntercept_iid_risk_eq (D : KernelDesign) (p N : ℕ) (h M θ : ℝ) (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] : (∫ z : Fin N → ℝ × ℝ, (clippedIntercept D p h M (fun i => (z i).1) (fun i => (z i).2) - θ) ^ 2 ∂Measure.pi (fun _ : Fin N => D.law ⊗ₘ κ)) = ∫ z : (Fin N → ℝ) × (Fin N → ℝ), (clippedIntercept D p h M z.1 z.2 - θ) ^ 2 ∂(Measure.pi (fun _ : Fin N => D.law) ⊗ₘ finProductKernel N κ) := by let := D.probability let split : (Fin N → ℝ × ℝ) → (Fin N → ℝ) × (Fin N → ℝ) := fun z => (fun i => (z i).1, fun i => (z i).2) have hs : Measurable split := by fun_prop have hf : Measurable (fun z : (Fin N → ℝ) × (Fin N → ℝ) => (clippedIntercept D p h M z.1 z.2 - θ) ^ 2) := ((clippedIntercept_measurable D p N h M).sub_const θ).pow_const 2 rw [← iid_joint_map_split N D.law κ] exact (integral_map hs.aemeasurable hf.aestronglyMeasurable).symm -
localPoly_fibre_mse_on_momentEventtheorem — Conditional mean-squared error on the moment event, dimension one. Let the design density lie between f_min > 0 and f_max on [x₀ − r, x₀ + r], and the kernel K be measurable, nonnegative, at most K_max, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ], and let the regression function m be, on the window [x₀ − r, x₀ + r], p = ⌈β⌉ − 1 times continuously differentiable with p-th derivative Hölder of order β − p and constant H. Take a positive sample size N, a positive bandwidth h not exceeding r, a clipping level M with |m(x₀)| ≤ M, and design points x_1, …, x_N for which every empirical kernel moment is within the design tolerance of its expectation. Let the responses be independent with Y_i drawn from a conditional outcome distribution that at each x_i in the window [x₀ − r, x₀ + r] has a finite second moment, mean m(x_i) and variance at most σ². Then the degree-p intercept clipped to [−M, M] satisfies E[(m̂ − m(x₀))²] ≤ C_bias² h^(2β) + C_var/(N h), the expectation being over the responses.hypothesesD :β H h M σ :ℝN :ℕm :ℝ → ℝhm :HolderRegression D.center D.radius β H mhN :0 < Nhh :0 < hhwindow :h ≤ D.radiushM :|m D.center| ≤ Mκ :Kernel ℝ ℝx :Fin N → ℝhnoise :hx :conclusion(∫ y, (clippedIntercept D (holderDerivOrder β) h M x y - m D.center) ^ 2 ∂Measure.pi (fun i => κ (x i)))≤ biasConstant D β H ^ 2 * h ^ (2 * β)+ varianceConstant D (holderDerivOrder β) σ / ((N : ℝ) * h)Proof (Lean source)
theorem localPoly_fibre_mse_on_momentEvent (D : InteriorDesign) {β H h M σ : ℝ} {N : ℕ} {m : ℝ → ℝ} (hm : HolderRegression D.center D.radius β H m) (hN : 0 < N) (hh : 0 < h) (hwindow : h ≤ D.radius) (hM : |m D.center| ≤ M) (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] (x : Fin N → ℝ) (hnoise : ∀ i, |x i - D.center| ≤ D.radius → MemLp (fun y : ℝ => y) 2 (κ (x i)) ∧ (∫ y, y ∂κ (x i)) = m (x i) ∧ Var[fun y : ℝ => y; κ (x i)] ≤ σ ^ 2) (hx : x ∈ momentEvent D (holderDerivOrder β) h N (designTolerance D (holderDerivOrder β))) : (∫ y, (clippedIntercept D (holderDerivOrder β) h M x y - m D.center) ^ 2 ∂Measure.pi (fun i => κ (x i))) ≤ biasConstant D β H ^ 2 * h ^ (2 * β) + varianceConstant D (holderDerivOrder β) σ / ((N : ℝ) * h) := by obtain ⟨hdet, hinv, hlev⟩ := localPoly_leverage_on_momentEvent D (holderDerivOrder β) hN hh hwindow x hx exact localPoly_fibre_mse_of_designBounds D hm hh hwindow hM κ x hnoise hdet hinv hlev -
localPoly_clipped_mse_unconditional_of_contDifftheorem — Unconditional mean-squared error of the clipped local-polynomial estimator for a globally smooth regression function, dimension one. Let the design density lie between positive constants f_min ≤ f_max on an interval [x₀ − r, x₀ + r], and let the kernel K be measurable, nonnegative, at most K_max, zero outside [−1, 1] and at least K_min > 0 on [−Δ, Δ]. Suppose β > 0, H ≥ 0, the regression function m is p = ⌈β⌉ − 1 times continuously differentiable on the whole real line, and its p-th derivative satisfies |m⁽ᵖ⁾(x) − m⁽ᵖ⁾(y)| ≤ H |x − y|^(β − p) for all x, y in that interval. Suppose also the sample size N is positive, the bandwidth h is positive and at most r, and the clipping level M satisfies |m(x₀)| ≤ M. Let (X_i, Y_i), i = 1, …, N, be independent pairs with X_i drawn from the design density and Y_i drawn, given X_i, from a conditional outcome distribution that at almost every design point x has a finite second moment, mean m(x) and variance at most σ². Then the degree-p kernel-weighted least-squares intercept at x₀ (taken to be zero when the weighted design matrix is singular), clipped to [−M, M], satisfies E[(m̂(x₀) − m(x₀))²] ≤ C_bias² h^(2β) + C_var/(N h) + 16 M² (p+1)² exp(−c₀ N h), with the same explicit constants as in the version with assumptions on the interval only.hypothesesD :β H h M σ :ℝN :ℕm :ℝ → ℝhβ :0 < βhH :0 ≤ Hhm :ContDiff ℝ (holderDerivOrder β) mhb :∀ x ∈ Icc (D.center - D.radius) (D.center + D.radius),∀ y ∈ Icc (D.center - D.radius) (D.center + D.radius),|iteratedDeriv (holderDerivOrder β) m x - iteratedDeriv (holderDerivOrder β) m y|≤ H * |x - y| ^ (β - (holderDerivOrder β : ℝ))hN :0 < Nhh :0 < hhwindow :h ≤ D.radiushM :|m D.center| ≤ Mκ :Kernel ℝ ℝconclusion(∫ z : Fin N → ℝ × ℝ, (clippedIntercept D (holderDerivOrder β) h M (fun i => (z i).1) (fun i => (z i).2) - m D.center) ^ 2 ∂Measure.pi (fun _ : Fin N => D.law ⊗ₘ κ))≤ biasConstant D β H ^ 2 * h ^ (2 * β)+ varianceConstant D (holderDerivOrder β) σ / ((N : ℝ) * h)+ 8 * M ^ 2 * failureBound D (holderDerivOrder β) N h (designTolerance D (holderDerivOrder β))Proof (Lean source)
theorem localPoly_clipped_mse_unconditional_of_contDiff (D : InteriorDesign) {β H h M σ : ℝ} {N : ℕ} {m : ℝ → ℝ} (hβ : 0 < β) (hH : 0 ≤ H) (hm : ContDiff ℝ (holderDerivOrder β) m) (hb : ∀ x ∈ Icc (D.center - D.radius) (D.center + D.radius), ∀ y ∈ Icc (D.center - D.radius) (D.center + D.radius), |iteratedDeriv (holderDerivOrder β) m x - iteratedDeriv (holderDerivOrder β) m y| ≤ H * |x - y| ^ (β - (holderDerivOrder β : ℝ))) (hN : 0 < N) (hh : 0 < h) (hwindow : h ≤ D.radius) (hM : |m D.center| ≤ M) (κ : Kernel ℝ ℝ) [IsMarkovKernel κ] (hnoise : ∀ᵐ x ∂D.law, MemLp (fun y : ℝ => y) 2 (κ x) ∧ (∫ y, y ∂κ x) = m x ∧ Var[fun y : ℝ => y; κ x] ≤ σ ^ 2) : (∫ z : Fin N → ℝ × ℝ, (clippedIntercept D (holderDerivOrder β) h M (fun i => (z i).1) (fun i => (z i).2) - m D.center) ^ 2 ∂Measure.pi (fun _ : Fin N => D.law ⊗ₘ κ)) ≤ biasConstant D β H ^ 2 * h ^ (2 * β) + varianceConstant D (holderDerivOrder β) σ / ((N : ℝ) * h) + 8 * M ^ 2 * failureBound D (holderDerivOrder β) N h (designTolerance D (holderDerivOrder β)) := localPoly_clipped_mse_unconditional D (HolderRegression.of_contDiff D.center D.radius D.radius_pos hβ hH hm hb) hN hh hwindow hM κ (hnoise.mono fun _ hx _ => hx)