Documentation

Mathlib.Analysis.SpecialFunctions.Sigmoid

Sigmoid function #

In this file we define the sigmoid function x : ℝ ↦ (1 + exp (-x))⁻¹ and prove some of its analytic properties.

We then show that the sigmoid function can be seen as an order embedding from ℝ to I = [0, 1] and that this embedding is both a topological embedding and a measurable embedding. We also prove that the composition of this embedding with the measurable embedding from a standard Borel space α to ℝ is a measurable embedding from α to I.

Main definitions and results #

Sigmoid as a function from ℝ to ℝ #

Sigmoid as a function from ℝ to I #

Sigmoid as an OrderEmbedding from ℝ to I #

Tags #

sigmoid, embedding, measurable embedding, topological embedding

noncomputable def Real.sigmoid (x : ℝ) :

The sigmoid function from ℝ to ℝ.

Equations
Instances For
    theorem Real.sigmoid_def (x : ℝ) :
    x.sigmoid = (1 + exp (-x))⁻¹
    theorem Real.sigmoid_pos (x : ℝ) :
    theorem Real.sigmoid_le {a b : ℝ} :
    a ≤ b → a.sigmoid ≤ b.sigmoid
    theorem Real.sigmoid_lt {a b : ℝ} :
    a < b → a.sigmoid < b.sigmoid
    @[simp]
    theorem Real.sigmoid_inj {a b : ℝ} :
    theorem Real.sigmoid_neg (x : ℝ) :
    theorem Real.deriv_sigmoid :
    deriv sigmoid = fun (x : ℝ) => x.sigmoid * (1 - x.sigmoid)
    theorem AnalyticAt.sigmoid {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → ℝ} {x : E} (fa : AnalyticAt ℝ f x) :
    theorem AnalyticAt.sigmoid' {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → ℝ} {x : E} (fa : AnalyticAt ℝ f x) :
    AnalyticAt ℝ (fun (z : E) => (f z).sigmoid) x
    theorem AnalyticOn.sigmoid {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → ℝ} {s : Set E} (fs : AnalyticOn ℝ f s) :
    theorem AnalyticWithinAt.sigmoid {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {f : E → ℝ} {s : Set E} {x : E} (fa : AnalyticWithinAt ℝ f s x) :
    noncomputable def unitInterval.sigmoid :

    The sigmoid function from ℝ to I.

    Equations
    Instances For
      theorem unitInterval.sigmoid_lt {a b : ℝ} :
      a < b → sigmoid a < sigmoid b
      @[simp]
      theorem unitInterval.sigmoid_inj {a b : ℝ} :