《神经网络与深度学习》习题答案

文章目录

前言

自己写的或找的习题答案,其中自己写的答案都会同步更新到邱锡鹏老师在 github 上关于这本书的 solutions 项目中(具体题解都在 issues 中)。

第 11 章

11-1

(1)

已 知   p ( x 1 , x 2 , x 3 ) = p ( x 3 ) ⋅ p ( x 2 ∣ x 3 ) ⋅ p ( x 1 ∣ x 2 ) 已知\space p(x_1,x_2,x_3) = p(x_3)·p(x_2|x_3)·p(x_1|x_2) 已知 p(x1​,x2​,x3​)=p(x3​)⋅p(x2​∣x3​)⋅p(x1​∣x2​)

  • 独立性
    p ( x 1 , x 2 , x 3 ) = p ( x 2 ∣ x 1 , x 3 ) ⋅ p ( x 1 , x 3 ) p ( x 3 ) ⋅ p ( x 2 ∣ x 3 ) ⋅ p ( x 1 ∣ x 2 ) = p ( x 2 ∣ x 1 , x 3 ) ⋅ p ( x 1 , x 3 ) p ( x 1 , x 3 ) = p ( x 3 ) ⋅ p ( x 2 ∣ x 3 ) ⋅ p ( x 1 ∣ x 2 ) p ( x 2 ∣ x 1 , x 3 ) ≠ p ( x 1 ) ⋅ p ( x 3 ) ∴ X 1 与 X 3 不 独 立 \begin{aligned} p(x_1,x_2,x_3) &= p(x_2|x1,x3)·p(x_1,x_3) \\ p(x_3)·p(x_2|x_3)·p(x_1|x_2) &= p(x_2|x1,x3)·p(x_1,x_3) \\ p(x_1,x_3) &= \frac{p(x_3)·p(x_2|x_3)·p(x_1|x_2)}{p(x_2|x1,x3)} \\ &≠ p(x_1)·p(x_3) \\ ∴ X_1 与 X_3 不独立 \end{aligned} p(x1​,x2​,x3​)p(x3​)⋅p(x2​∣x3​)⋅p(x1​∣x2​)p(x1​,x3​)∴X1​与X3​不独立​=p(x2​∣x1,x3)⋅p(x1​,x3​)=p(x2​∣x1,x3)⋅p(x1​,x3​)=p(x2​∣x1,x3)p(x3​)⋅p(x2​∣x3​)⋅p(x1​∣x2​)​​=p(x1​)⋅p(x3​)​

  • 条件独立性

p ( x 1 , x 3 ∣ x 2 ) = p ( x 1 , x 2 , x 3 ) p ( x 2 ) = p ( x 3 ) ⋅ p ( x 2 ∣ x 3 ) ⋅ p ( x 1 ∣ x 2 ) p ( x 2 ) = p ( x 2 , x 3 ) ⋅ p ( x 1 ∣ x 2 ) p ( x 2 ) = p ( x 2 ) ⋅ p ( x 3 ∣ x 2 ) ⋅ p ( x 1 ∣ x 2 ) p ( x 2 ) = p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) ∴ X 1 ⊥  ⁣ ⁣ ⁣ ⊥ X 3 ∣ X 2 \begin{aligned} p(x_1,x_3|x2) &= \frac{p(x_1,x_2,x_3)}{p(x_2)} \\ &= \frac{p(x_3)·p(x_2|x_3)·p(x_1|x_2)}{p(x_2)} \\ &= \frac{p(x_2,x_3)·p(x_1|x_2)}{p(x_2)} \\ &= \frac{p(x2)·p(x_3|x_2)·p(x_1|x_2)}{p(x_2)} \\ &= p(x_1|x_2)·p(x_3|x_2) \\ ∴X_1 \perp\!\!\!\perp X_3|X_2 \end{aligned} p(x1​,x3​∣x2)∴X1​⊥⊥X3​∣X2​​=p(x2​)p(x1​,x2​,x3​)​=p(x2​)p(x3​)⋅p(x2​∣x3​)⋅p(x1​∣x2​)​=p(x2​)p(x2​,x3​)⋅p(x1​∣x2​)​=p(x2​)p(x2)⋅p(x3​∣x2​)⋅p(x1​∣x2​)​=p(x1​∣x2​)⋅p(x3​∣x2​)​

(2)

与 (1) 镜像,不再赘述。

(3)

已 知   p ( x 1 , x 2 , x 3 ) = p ( x 2 ) ⋅ p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) 已知\space p(x_1,x_2,x_3) = p(x_2)·p(x_1|x_2)·p(x_3|x_2) 已知 p(x1​,x2​,x3​)=p(x2​)⋅p(x1​∣x2​)⋅p(x3​∣x2​)

  • 独立性
    p ( x 1 , x 2 , x 3 ) = p ( x 2 ∣ x 1 , x 3 ) ⋅ p ( x 1 , x 3 ) p ( x 2 ) ⋅ p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) = p ( x 2 ∣ x 1 , x 3 ) ⋅ p ( x 1 , x 3 ) p ( x 1 , x 3 ) = p ( x 2 ) ⋅ p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) p ( x 2 ∣ x 1 , x 3 ) ≠ p ( x 1 ) ⋅ p ( x 3 ) ∴ X 1 与 X 3 不 独 立 \begin{aligned} p(x_1,x_2,x_3) &= p(x_2|x1,x3)·p(x_1,x_3) \\ p(x_2)·p(x_1|x_2)·p(x_3|x_2) &= p(x_2|x1,x3)·p(x_1,x_3) \\ p(x_1,x_3) &= \frac{p(x_2)·p(x_1|x_2)·p(x_3|x_2)}{p(x_2|x1,x3)} \\ &≠ p(x_1)·p(x_3) \\ ∴ X_1 与 X_3 不独立 \end{aligned} p(x1​,x2​,x3​)p(x2​)⋅p(x1​∣x2​)⋅p(x3​∣x2​)p(x1​,x3​)∴X1​与X3​不独立​=p(x2​∣x1,x3)⋅p(x1​,x3​)=p(x2​∣x1,x3)⋅p(x1​,x3​)=p(x2​∣x1,x3)p(x2​)⋅p(x1​∣x2​)⋅p(x3​∣x2​)​​=p(x1​)⋅p(x3​)​

  • 条件独立性

p ( x 1 , x 3 ∣ x 2 ) = p ( x 1 , x 2 , x 3 ) p ( x 2 ) = p ( x 2 ) ⋅ p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) p ( x 2 ) = p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) ∴ X 1 ⊥  ⁣ ⁣ ⁣ ⊥ X 3 ∣ X 2 \begin{aligned} p(x_1,x_3|x2) &= \frac{p(x_1,x_2,x_3)}{p(x_2)} \\ &= \frac{p(x_2)·p(x_1|x_2)·p(x_3|x_2)}{p(x_2)} \\ &= p(x_1|x_2)·p(x_3|x_2) \\ ∴X_1 \perp\!\!\!\perp X_3|X_2 \end{aligned} p(x1​,x3​∣x2)∴X1​⊥⊥X3​∣X2​​=p(x2​)p(x1​,x2​,x3​)​=p(x2​)p(x2​)⋅p(x1​∣x2​)⋅p(x3​∣x2​)​=p(x1​∣x2​)⋅p(x3​∣x2​)​

(4)

已 知   p ( x 1 , x 2 , x 3 ) = p ( x 1 ) ⋅ p ( x 3 ) ⋅ p ( x 2 ∣ x 1 , x 3 ) 已知\space p(x_1,x_2,x_3) = p(x_1)·p(x_3)·p(x_2|x_1,x_3) 已知 p(x1​,x2​,x3​)=p(x1​)⋅p(x3​)⋅p(x2​∣x1​,x3​)

  • 独立性
    p ( x 1 , x 2 , x 3 ) = p ( x 2 ∣ x 1 , x 3 ) ⋅ p ( x 1 , x 3 ) p ( x 1 ) ⋅ p ( x 3 ) ⋅ p ( x 2 ∣ x 1 , x 3 ) = p ( x 2 ∣ x 1 , x 3 ) ⋅ p ( x 1 , x 3 ) p ( x 1 , x 3 ) = p ( x 1 ) ⋅ p ( x 3 ) ⋅ p ( x 2 ∣ x 1 , x 3 ) p ( x 2 ∣ x 1 , x 3 ) = p ( x 1 ) ⋅ p ( x 3 ) ∴ X 1 与 X 3 独 立 \begin{aligned} p(x_1,x_2,x_3) &= p(x_2|x1,x3)·p(x_1,x_3) \\ p(x_1)·p(x_3)·p(x_2|x_1,x_3) &= p(x_2|x1,x3)·p(x_1,x_3) \\ p(x_1,x_3) &= \frac{p(x_1)·p(x_3)·p(x_2|x_1,x_3)}{p(x_2|x1,x3)} \\ &= p(x_1)·p(x_3) \\ ∴ X_1 与 X_3 独立 \end{aligned} p(x1​,x2​,x3​)p(x1​)⋅p(x3​)⋅p(x2​∣x1​,x3​)p(x1​,x3​)∴X1​与X3​独立​=p(x2​∣x1,x3)⋅p(x1​,x3​)=p(x2​∣x1,x3)⋅p(x1​,x3​)=p(x2​∣x1,x3)p(x1​)⋅p(x3​)⋅p(x2​∣x1​,x3​)​=p(x1​)⋅p(x3​)​

  • 条件独立性

p ( x 1 , x 3 ∣ x 2 ) = p ( x 1 , x 2 , x 3 ) p ( x 2 ) = p ( x 1 ) ⋅ p ( x 3 ) ⋅ p ( x 2 ∣ x 1 , x 3 ) p ( x 2 ) ≠ p ( x 1 ∣ x 2 ) ⋅ p ( x 3 ∣ x 2 ) ∴ X 1 ̸  ⁣ ⊥  ⁣ ⁣ ⁣ ⊥ X 3 ∣ X 2 \begin{aligned} p(x_1,x_3|x2) &= \frac{p(x_1,x_2,x_3)}{p(x_2)} \\ &= \frac{p(x_1)·p(x_3)·p(x_2|x_1,x_3)}{p(x_2)} \\ &≠ p(x_1|x_2)·p(x_3|x_2) \\ ∴X_1 \not \! \perp \!\!\! \perp X_3|X_2 \end{aligned} p(x1​,x3​∣x2)∴X1​​⊥⊥X3​∣X2​​=p(x2​)p(x1​,x2​,x3​)​=p(x2​)p(x1​)⋅p(x3​)⋅p(x2​∣x1​,x3​)​​=p(x1​∣x2​)⋅p(x3​∣x2​)​

上一篇:期望生成函数笔记


下一篇:[gym102978C] Count Min Ratio