Posted on Categories:CS代写, Machine Learning, 机器学习, 计算机代写

# 机器学习代考_Machine Learning代考_COMP5318 Variable Elimination

avatest™

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 机器学习代考_Machine Learning代考_Variable Elimination

Exact inference methods are essentially a kind of dynamic programming methods. Such methods attempt to reduce the cost of computing the target probability by exploiting the conditional independence encoded by the graphical model. Among them, variable elimination is the most intuitive one and is the basis of other exact inference methods.

We demonstrate variable elimination with the directed graphical model in • Figure $14.7$ (a).

Suppose that the inference objective is to compute the marginal probability $P\left(x_5\right)$. To compute it, we only need to eliminate the variables $\left{x_1, x_2, x_3, x_4\right}$ by summation, that is

\begin{aligned} P\left(x_5\right) &=\sum_{x_4} \sum_{x_3} \sum_{x_2} \sum_{x_1} P\left(x_1, x_2, x_3, x_4, x_5\right) \ &=\sum_{x_4} \sum_{x_3} \sum_{x_2} \sum_{x_1} P\left(x_1\right) P\left(x_2 \mid x_1\right) P\left(x_3 \mid x_2\right) P\left(x_4 \mid x_3\right) P\left(x_5 \mid x_3\right) . \end{aligned}
By doing the summations in the order of $\left{x_1, x_2, x_4, x_3\right}$, we have
\begin{aligned} P\left(x_5\right) &=\sum_{x_3} P\left(x_5 \mid x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) \sum_{x_2} P\left(x_3 \mid x_2\right) \sum_{x_1} P\left(x_1\right) P\left(x_2 \mid x_1\right) \ &=\sum_{x_3} P\left(x_5 \mid x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) \sum_{x_2} P\left(x_3 \mid x_2\right) m_{12}\left(x_2\right), \quad(14.15) \end{aligned}
where $m_{i j}\left(x_j\right)$ is an intermediate result in the summation, the subscript $i$ indicates that the term is the summation result with respect to $x_i$, and the subscript $j$ indicates other variables in the term. We notice that $m_{i j}\left(x_j\right)$ is a function of $x_j$. By repeating the process, we have
\begin{aligned} P\left(x_5\right) &=\sum_{x_3} P\left(x_5 \mid x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) m_{23}\left(x_3\right) \ &=\sum_{x_3} P\left(x_5 \mid x_3\right) m_{23}\left(x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) \ &=\sum_{x_3} P\left(x_5 \mid x_3\right) m_{23}\left(x_3\right) m_{43}\left(x_3\right) \ &=m_{35}\left(x_5\right) . \end{aligned}

## 机器学习代考_Machine Learning代考_Belief Propagation

The belief propagation algorithm avoid repetitive calculations by considering the summation operations in variable elimination as a process of message passing. In variable elimination, a variable $x_i$ is eliminated by the summation operation
$$m_{i j}\left(x_j\right)=\sum_{x_i} \psi\left(x_i, y_j\right) \prod_{k \in n(i) \backslash j} m_{k i}\left(x_i\right),$$
where $n(i)$ are the adjacent nodes of $x_i$. In belief propagation, however, the operation is considered as passing the message $m_{i j}\left(x_j\right)$ from $x_i$ to $x_j$. By doing so, the variable elimination process in (14.15) and (14.16) becomes a message passing process, as illustrated in $-$ Figure $14.7$ (b). We see that each message passing operation involves only $x_i$ and its adjacent nodes, and hence the calculations are restricted to local regions.

In belief propagation, a node starts to pass messages after receiving the messages from all other nodes. The marginal distribution of a node is proportional to the product of all received messages, that is
$$P\left(x_i\right) \propto \prod_{k \in n(i)} m_{k i}\left(x_i\right) .$$

## 机器学习代考Machine Learning代考_Variable Elimination

$$P\left(x_5\right)=\sum_{x 3} P\left(x_5 \mid x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) \sum_{x_2} P\left(x_3 \mid x_2\right) \sum_{x_1} P\left(x_1\right) P\left(x_2 \mid x_1\right) \quad=\sum_{x 3} P\left(x_5 \mid x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) \sum_{x_2} P\left(x_3 \mid x_2\right) m_{12}\left(x_2\right)$$

$$P\left(x_5\right)=\sum_{x_3} P\left(x_5 \mid x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right) m_{23}\left(x_3\right) \quad=\sum_{x_3} P\left(x_5 \mid x_3\right) m_{23}\left(x_3\right) \sum_{x_4} P\left(x_4 \mid x_3\right)=\sum_{x_3} P\left(x_5 \mid x_3\right) m_{23}\left(x_3\right) m_{43}\left(x_3\right) \quad m_{35}\left(x_5\right)$$

## 机器学习代考Machine Learning代考_Belief Propagation

$$P\left(x_i\right) \propto \prod_{k \in n(i)} m_{k i}\left(x_i\right)$$

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。