浏览代码

将Chapter4/5/6/7用docsify展示

Sm1les 7 年之前
父节点
当前提交
718a2a38da
共有 4 个文件被更改,包括 9 次插入5 次删除
  1. 1 0
      docs/README.md
  2. 4 0
      docs/_sidebar.md
  3. 4 4
      docs/chapter4/chapter4.md
  4. 0 1
      docs/chapter7/chapter7.md

+ 1 - 0
docs/README.md

@@ -1 +1,2 @@
 <h1>南瓜书PumpkinBook</h1>
+Loading...

+ 4 - 0
docs/_sidebar.md

@@ -2,5 +2,9 @@
   - [第1章 绪论](chapter1/chapter1.md)
   - [第2章 模型评估](chapter2/chapter2.md)
   - [第3章 线性模型](chapter3/chapter3.md)
+  - [第4章 决策树](chapter4/chapter4.md)
+  - [第5章 神经网络](chapter5/chapter5.md)
+  - [第6章 支持向量机](chapter6/chapter6.md)
+  - [第7章 贝叶斯分类器](chapter7/chapter7.md)
 
 

+ 4 - 4
docs/chapter4/chapter4.md

@@ -57,11 +57,11 @@ Gini(D) &=\sum_{k=1}^{|y|}\sum_{k\neq{k'}}{p_k}{p_{k'}}\\
 $$
 [推导]:假定当前样本集合 $D$ 中第 $k$ 类样本所占的比例为 $p_k(k =1,2,...,|y|)$,则 $D$ 的**基尼值**为
 $$
-\begin{split}
+\begin{aligned}
 Gini(p) &=\sum_{k=1}^{|y|}\sum_{k\neq{k'}}{p_k}{p_{k'}}\\
 &=\sum_{k=1}^{|y|}{p_k}{(1-p_k)} \\
 &=1-\sum_{k=1}^{|y|}p_k^2 
-\end{split}
+\end{aligned}
 $$
 
 ## 4.7 - 4.8
@@ -72,7 +72,7 @@ T_a=\lbrace{\frac{a^i+a^{i+1}}{2}|1\leq{i}\leq{n-1}}\rbrace \tag {4.7}
 $$
 对于取值集合 $ T_a$  中的每个 $t$  值计算将特征 $a$  离散为一个特征值只有两个值,分别是 $\lbrace{a} >t\rbrace$ 和 $\lbrace{a} \leq{t}\rbrace$  的特征,计算新特征的信息增益,找到信息增益最大的 $t$ 值即为该特征的最优划分点。
 $$
-\begin{split}
+\begin{aligned}
 Gain(D,a) &= \max\limits_{t \in T_a} \ Gain(D,a) \\
-&= \max\limits_{t \in T_a} \ Ent(D)-\sum_{\lambda \in \{-,+\}} \frac{\left | D_t^{\lambda } \right |}{\left |D  \right |}Ent(D_t^{\lambda }) \end{split} \tag{4.8}
+&= \max\limits_{t \in T_a} \ Ent(D)-\sum_{\lambda \in \{-,+\}} \frac{\left | D_t^{\lambda } \right |}{\left |D  \right |}Ent(D_t^{\lambda }) \end{aligned} \tag{4.8}
 $$

+ 0 - 1
docs/chapter7/chapter7.md

@@ -43,7 +43,6 @@ Prior probabilities of the classes. If specified the priors are not adjusted acc
 
 var_smoothing : float, optional (default=1e-9)
 Portion of the largest variance of all features that is added to variances for calculation stability.
-
 #### 贝叶斯应用
 
 1. 中文分词