Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Algorithm 6, step 2(a), p. 356 — the population weighted least-squares fit of z_j with weights p_j(1−p_j) is E(y*_j − p_j|x)/(p_j(1 − p_j))

Proved
AddLogReg.Multiclass.algorithm_6_fit

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

logitboostmulticlass-classificationp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let J≥2J\ge2J≥2, let ν\nuν be a probability measure on X×{1,…,J}X\times\{1,\dots,J\}X×{1,…,J} and F(x)F(x)F(x) the current fit with model probabilities pj(x)p_j(x)pj​(x) given by (40). In Algorithm 6, step 2(a), the working response and weight of class jjj are

zj=yj∗−pj(x)pj(x)(1−pj(x)),wj=pj(x)(1−pj(x)),z_j = \frac{y^*_j - p_j(x)}{p_j(x)(1-p_j(x))},\qquad w_j = p_j(x)(1-p_j(x)),zj​=pj​(x)(1−pj​(x))yj∗​−pj​(x)​,wj​=pj​(x)(1−pj​(x)),

and the population version of the weighted least-squares fit of zjz_jzj​ on xxx is the weighted conditional mean Ewj(zj∣x)=E[wjzj∣x]/E[wj∣x]E_{w_j}(z_j\mid x) = E[w_jz_j\mid x]/E[w_j\mid x]Ewj​​(zj​∣x)=E[wj​zj​∣x]/E[wj​∣x]. For every xxx and jjj,

Ewj(zj∣x)=E(yj∗−pj(x)∣x)pj(x)(1−pj(x)).E_{w_j}(z_j\mid x) = \frac{E(y^*_j - p_j(x)\mid x)}{p_j(x)(1-p_j(x))}.Ewj​​(zj​∣x)=pj​(x)(1−pj​(x))E(yj∗​−pj​(x)∣x)​.

Since the weight depends on xxx only, the fitted fmj(x)f_{mj}(x)fmj​(x) of Algorithm 6 coincides with the diagonal quasi-Newton step of the Derivation of Result 6.

Formalization Note "Population version" replaces the weighted least-squares regression by the weighted conditional expectation, as for Algorithm 3. Conditional expectations are integrals against ν.condKernel x.

Preamble
import Mathlib
import Definitions.Def_AddLogReg_Multiclass_Setting

open MeasureTheory ProbabilityTheory ENNReal
Formal statement
namespace AddLogReg.Multiclass

theorem algorithm_6_fit {J : ℕ} [NeZero J] (hJ : 2 ≤ J) {X : Type*} [MeasurableSpace X]
    (ν : Measure (X × Fin J)) [IsProbabilityMeasure ν] (F : X → Fin J → ℝ) (x : X) (j : Fin J) :
    wCondExpBy ν (fun x' _ => classWeight F x' j) (fun x' y => workingResponse F x' y j) x =
      (∫ y, (ystar y j - softmax (F x) j) ∂(ν.condKernel x)) /
        (softmax (F x) j * (1 - softmax (F x) j)) := by sorry

end AddLogReg.Multiclass
Source
Friedman, Hastie and Tibshirani, Additive logistic regression: a statistical view of boosting, Ann. Statist. 28 (2000), p. 356, Algorithm 6, step 2(a); p. 347 (weighted conditional expectation)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me