✍️
mathematics_basic_for_ML
  • README
  • README
    • Summary
    • Geometry
      • EulerAngle
      • Gimbal lock
      • Quaternion
      • RiemannianManifolds
      • RotationMatrix
      • SphericalHarmonics
    • Information
      • Divergence
      • 信息熵 entropy
    • LinearAlgebra
      • 2D仿射变换(2D Affine Transformation)
      • 2DTransformation
      • 3D变换(3D Transformation)
      • ComplexTransformation
      • Conjugate
      • Hessian
      • IllConditioning
      • 逆变换(Inverse transform)
      • SVD
      • det
      • eigendecomposition
      • 矩阵
      • norm
      • orthogonal
      • special_matrix
      • trace
      • vector
    • Mathematics
      • Complex
      • ExponentialDecay
      • average
      • calculus
      • convex
      • derivative
      • 距离
      • function
      • space
      • Formula
        • euler
        • jensen
        • taylor
        • trigonometric
    • Numbers
      • 几何级数
      • SpecialNumbers
    • NumericalComputation
      • ConstrainedOptimization
      • GradientDescent
      • Newton
      • Nominal
      • ODE_SDE
      • Preprocessing
    • Probability
      • bayes
      • distribution
      • expectation_variance
      • 贝叶斯公式
      • functions
      • likelihood
      • mixture_distribution
      • 一些术语
      • probability_distribution
Powered by GitBook
On this page

Was this helpful?

  1. README
  2. Information

信息熵 entropy

PreviousDivergenceNextLinearAlgebra

Last updated 2 years ago

Was this helpful?

自信息:表示一个事件的信息量,

I(x)=−log⁡P(x)1\begin{aligned} I(x) = -\log P(x) && {1} \end{aligned}I(x)=−logP(x)​​1​

如果公式(1)中的log以e为底,则I(x)单位是奈特(nats)。 如果公式(1)中的log以2为底,则I(x)单位是比特(bit)或者香农(shannons)。

熵(香农熵,Shannon Entropy):表示整个概率分布的不确定性。

H(x)=Ex∼P[I(x)]2\begin{aligned} H(x) = E_{x\sim P}[I(x)] && {2} \end{aligned}H(x)=Ex∼P​[I(x)]​​2​

根据中离散型变量期望的计算公式(公式1),可进一步得出:

H(x)=−∑i=1nP(xi)log⁡P(xi)3\begin{aligned} H(x) = -\sum_{i=1}^nP(x_i)\log P(x_i) && {3} \end{aligned}H(x)=−i=1∑n​P(xi​)logP(xi​)​​3​

公式(3)中: n: 该分布中x可以取n个不同的值 P(xi)P(x_i)P(xi​)为x取第i个值的概率 公式(2)和(3)都是基于公式(1)计算的,因此公式中的log也可以以e为底或者以2为底,以上下文环境为准。

条件熵H(Y|X):X给定条件下Y的条件概率分布的熵对X的数学期望

H(Y∣X)=∑i=1nH(Y∣X=xi)P(X=xi)\begin{aligned} H(Y|X) = \sum_{i=1}^nH(Y|X=x_i)P(X=x_i) \end{aligned}H(Y∣X)=i=1∑n​H(Y∣X=xi​)P(X=xi​)​

基尼指数:

Gini(p)=∑Kpk(1−pk)=1−∑Kpk2\begin{aligned} Gini(p) = \sum^K p_k(1-p_k) = 1 - \sum^Kp_k^2 \end{aligned}Gini(p)=∑K​pk​(1−pk​)=1−∑K​pk2​​
期望和方差