西瓜书第一章课后习题答案

第1章 绪论

  • 1.1 略

  • 1.2 参考链接:西瓜书第一章习题 - 简书 (jianshu.com)

    首先明确基本合取式有多少种,设西瓜的三个不同属性的特征分别为(A1,A2),(B1,B2,B3),(C1,C2,C3),则

    基本组合:18种

    一个属性泛化:9+6+6=21

    两个属性泛化:3+3+2=8

    三个属性泛化:1

    基本合取式总共有48种

    因此用K个合取式的析合范式表示假设空间,总共有 ∑ i = 0 48 C 48 i = 2 48 \sum\limits_{i = 0}^{48} {C_{48}^i} = {2^{48}} i=048C48i=248种可能的假设,但是很多析合范式最后计算的值是相同的,因此要把这些重复的排除,排除重复项需借助代码

  • 1.3 略

  • 1.4
    ∑ f E o t e ( a ∣ X , f ) = ∑ f ∑ h ∑ x ∈ χ − X p ( x ) ⋅ ℓ ( h ( x ) , f ( x ) ) ⋅ p ( h ∣ X , a ) = ∑ f ℓ ( h ( x ) , f ( x ) ) ⋅ ∑ h p ( h ∣ X , a ) ⋅ ∑ x ∈ χ − X p ( x ) = ∑ x ∈ χ − X p ( x ) ⋅ ∑ f ℓ ( h ( x ) = f ( x ) ) + ℓ ( h ( x ) ≠ f ( x ) ) \begin{array}{l} \sum\limits_f {{E_{{\rm{ote }}}}} \left( {{_a}|X,f} \right) = \sum\limits_f {\sum\limits_h {\sum\limits_{x \in \chi - X} {p(x) \cdot \ell (h(x),f(x)) \cdot p\left( {h|X,{_a}} \right)} } } \\ {\rm{ = }}\sum\limits_f {\ell (h(x),f(x))} \cdot \sum\limits_h {p\left( {h|X,{_a}} \right)} \cdot \sum\limits_{x \in \chi - X} {p(x)} \\ {\rm{ }} = \sum\limits_{x \in \chi - X} {p(x)} \cdot \sum\limits_f {\ell (h(x) = f(x)) + \ell (h(x) \ne f(x))} \end{array} fEote(aX,f)=fhxχXp(x)(h(x),f(x))p(hX,a)=f(h(x),f(x))hp(hX,a)xχXp(x)=xχXp(x)f(h(x)=f(x))+(h(x)=f(x))

    假 设 ℓ ( h ( x ) = f ( x ) ) = a , ℓ ( h ( x ) ≠ f ( x ) ) = b 假设\ell (h(x) = f(x))=a,\ell (h(x) \ne f(x))={\text{b}} (h(x)=f(x))=a,(h(x)=f(x))=b

    则有:原式=

    ∑ x ∈ χ − X p ( x ) ⋅ ∑ f ℓ ( h ( x ) = f ( x ) ) + ℓ ( h ( x ) ≠ f ( x ) ) = ∑ x ∈ χ − X p ( x ) ⋅ 1 2 ⋅ 2 ∣ x ∣ ( a + b ) \begin{array}{l} \sum\limits_{x \in \chi - X} {p(x)} \cdot \sum\limits_f {\ell (h(x) = f(x)) + \ell (h(x) \ne f(x))} \\ {\rm{ }} = \sum\limits_{x \in \chi - X} {p(x)} \cdot \frac{1}{2} \cdot {2^{\left| x \right|}}\left( {a + b} \right) \end{array} xχXp(x)f(h(x)=f(x))+(h(x)=f(x))=xχXp(x)212x(a+b)

​ 仍然为常数,因此没有免费的午餐定理仍存在

  • 1.5 略

你可能感兴趣的:(西瓜书解答,机器学习)