PowerPoint Presentation
Assume r = 2, d’ =4.
Copyright By PowCoder代写 加微信 powcoder
In the 1st node, say, x7 and x2 are picked.
From the row of x7, x7 ∈[-1.2, 4.5]. Assume t = 2.1.
From the row of x2, x2 ∈[-16.7, 7.3]. Assume t = 4.5.
From the original dataset X
$\mathbf{X}_k = \left[ \begin{array}{c} x_1^{k} \\ x_2^{k} \\ x_{3}^{k} \\ x_4^{k} \end{array} \right] = \left[ \begin{array}{cccc} -0.2 & 1.1 & \cdots & 3.6 \\ -7.1 & -8.6 & \cdots & 2.9 \\ 0.9 & -1.2 & \cdots & 4.5 \\ 4.7 & 5.5 & \cdots & 2.87 \end{array} \right] \begin{array}{c} \leftarrow x_1 \\ \leftarrow x_2 \\ \leftarrow x_{7} \\ \leftarrow x_{25} \end{array}$
Two options. Which one is to choose?
Entropy impurity (or occasionally information impurity):
At the root node “6/8”:
$$i(n) = – \sum_{j=1}^M P(\omega_j) \log_2 P(\omega_j)$$
\begin{itemize}
\item $n$ denotes the node $n$
\item $M$ denotes the number of classes
\item $P(\omega_j)$ is the fraction of patterns at node $n$ that are in class $\omega_j$
\end{itemize}
\noindent 6 is for class $\omega_1$; 8 is for class $\omega_2$.
\begin{align*}
i(n) &= – \sum_{j=1}^2 P(\omega_j) \log_2 P(\omega_j)\\
&= – P(\omega_1) \log_2 P(\omega_1) – P(\omega_2) \log_2 P(\omega_2)\\
&= – \frac{6}{8+6} \log_2 \frac{6}{8+6} – \frac{8}{8+6} \log_2 \frac{8}{8+6}\\
\end{align*}
\begin{align*}
i(n_1) &= – \sum_{j=1}^2 P(\omega_j) \log_2 P(\omega_j)\\
&= – P(\omega_1) \log_2 P(\omega_1) – P(\omega_2) \log_2 P(\omega_2)\\
&= – \frac{6}{6+0} \log_2 \frac{6}{6+0} – \frac{0}{6+0} \log_2 \frac{0}{6+0}\\
\end{align*}
The drop in impurity is defined by:
$$\Delta i(n) = i(n) – \sum_{k=1}^B P_k i(n_k)$$
\begin{itemize}
\item $B$ denotes the number of branches at node $n$
\item $P_k$ is the fraction of patterns sent down the link to node $n_k$
\item $\sum_{k=1}^B P_k = 1$
\end{itemize}
\begin{align*}
\Delta i(n) &= i(n) – \sum_{k=1}^2 P_k i(n_k)\\
&= 0.9852 – P_1 i(n_1) – P_2 i(n_2)\\
&= 0.9852 – \frac{6}{6+8} \times 0.8113 – \frac{8}{6+8} \times 0\\
\end{align*}
\begin{align*}
i(n_1) &= – \sum_{j=1}^2 P(\omega_j) \log_2 P(\omega_j)\\
&= – P(\omega_1) \log_2 P(\omega_1) – P(\omega_2) \log_2 P(\omega_2)\\
&= – \frac{6}{6+2} \log_2 \frac{6}{6+2} – \frac{2}{6+2} \log_2 \frac{2}{6+2}\\
\end{align*}
\begin{align*}
i(n_2) &= – \sum_{j=1}^2 P(\omega_j) \log_2 P(\omega_j)\\
&= – P(\omega_1) \log_2 P(\omega_1) – P(\omega_2) \log_2 P(\omega_2)\\
&= – \frac{0}{0+6} \log_2 \frac{0}{0+6} – \frac{6}{0+6} \log_2 \frac{0}{0+6}\\
\end{align*}
The drop in impurity is defined by:
$$\Delta i(n) = i(n) – \sum_{k=1}^B P_k i(n_k)$$
\begin{itemize}
\item $B$ denotes the number of branches at node $n$
\item $P_k$ is the fraction of patterns sent down the link to node $n_k$
\item $\sum_{k=1}^B P_k = 1$
\end{itemize}
\begin{align*}
\Delta i(n) &= i(n) – \sum_{k=1}^2 P_k i(n_k)\\
&= 0.9852 – P_1 i(n_1) – P_2 i(n_2)\\
&= 0.9852 – \frac{6}{6+8} \times 0.9852 – \frac{8}{6+8} \times 0.8631\\
\end{align*}
\begin{align*}
i(n_1) &= – \sum_{j=1}^2 P(\omega_j) \log_2 P(\omega_j)\\
&= – P(\omega_1) \log_2 P(\omega_1) – P(\omega_2) \log_2 P(\omega_2)\\
&= – \frac{4}{4+3} \log_2 \frac{4}{4+3} – \frac{3}{4+3} \log_2 \frac{3}{4+3}\\
\end{align*}
\begin{align*}
i(n_2) &= – \sum_{j=1}^2 P(\omega_j) \log_2 P(\omega_j)\\
&= – P(\omega_1) \log_2 P(\omega_1) – P(\omega_2) \log_2 P(\omega_2)\\
&= – \frac{2}{2+5} \log_2 \frac{2}{2+5} – \frac{5}{2+5} \log_2 \frac{5}{2+5}\\
\end{align*}
Two options. Which one is to choose?
Pick the one with the largest $\Delta i(n)$
Assume r = 2, d’ = 4.
In the next node, say, x1 and x7 are picked.
From the row of x1, x1 ∈[-6.3, 9.3]. Assume t = -0.5
From the row of x7, x7 ∈[-16.7, 7.3]. Assume t = 1.2.
$\mathbf{X}_k = \begin{array}{c} x_1 \rightarrow \\ x_2 \rightarrow \\ \vdots \\ x_{7} \rightarrow \\ \vdots \\ x_d \rightarrow \end{array} \left[ \begin{array}{cccc} -0.2 & 1.1 & \cdots & 3.6 \\ -7.1 & -8.6 & \cdots & 2.9 \\ \vdots & \vdots & \vdots & \vdots \\ 0.9 & -1.2 & \cdots & 4.5 \\ \vdots & \vdots & \vdots & \vdots \\ 4.7 & 5.5 & \cdots & 2.87 \end{array} \right]$
Assume r = 2, d’ = 4.
In the next node, say, x2 is picked.
From the row of x25, x25 ∈[0.2, 5.5]. Assume t = 1.6
From the row of x2, x2 ∈[-8.1, 4.9]. Assume t = -3.3.
$\mathbf{X}_k = \begin{array}{c} x_1 \rightarrow \\ x_2 \rightarrow \\ \vdots \\ x_{7} \rightarrow \\ \vdots \\ x_d \rightarrow \end{array} \left[ \begin{array}{cccc} -0.2 & 1.1 & \cdots & 3.6 \\ -7.1 & -8.6 & \cdots & 2.9 \\ \vdots & \vdots & \vdots & \vdots \\ 0.9 & -1.2 & \cdots & 4.5 \\ \vdots & \vdots & \vdots & \vdots \\ 4.7 & 5.5 & \cdots & 2.87 \end{array} \right]$
�i(n) = i(n)�
= 0.9852� P1i(n1)� P2i(n2)
P (!j) log2 P (!j)
= �P (!1) log2 P (!1)� P (!2) log2 P (!2)
�i(n) = i(n)�
= 0.9852� P1i(n1)� P2i(n2)
/docProps/thumbnail.jpeg
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com