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

# 计算机代写|机器学习代写Machine Learning代考|Graphical lasso for discrete MRFs/CRFs

avatest™

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 计算机代写|机器学习代写Machine Learning代考|Graphical lasso for discrete MRFs/CRFs

It is possible to extend the graphical lasso idea to the discrete MRF and CRF case. However, now there is a set of parameters associated with each edge in the graph, so we have to use the graph analog of group lasso (see ??). For example, consider a pairwise CRF with ternary nodes, and node and edge potentials given by
$$\psi_t\left(y_t, \boldsymbol{x}\right)=\left(\begin{array}{c} \boldsymbol{v}{t 1}^{\top} \boldsymbol{x} \ \boldsymbol{v}{t 2}^{\top} \boldsymbol{x} \ \boldsymbol{v}{t 3}^{\top} \boldsymbol{x} \end{array}\right), \psi{s t}\left(y_s, y_t, \boldsymbol{x}\right)=\left(\begin{array}{ccc} \boldsymbol{w}{t 11}^{\top} \boldsymbol{x} & \boldsymbol{w}{s t 12}^{\top} \boldsymbol{x} & \boldsymbol{w}{s t 13}^{\top} \boldsymbol{x} \ \boldsymbol{w}{s t 21}^{\top} \boldsymbol{x} & \boldsymbol{w}{s t 22}^{\top} \boldsymbol{x} & \boldsymbol{w}{s t 23}^{\top} \boldsymbol{x} \ \boldsymbol{w}{s t 31}^{\top} \boldsymbol{x} & \boldsymbol{w}{s t 32}^{\top} \boldsymbol{x} & \boldsymbol{w}_{s t 33}^{\top} \boldsymbol{x} \end{array}\right)$$

where we assume $\boldsymbol{x}$ begins with a constant 1 term, to account for the offset. (If $\boldsymbol{x}$ only contains 1 , the CRF reduces to an MRF.) Note that we may choose to set some of the $\boldsymbol{v}{t k}$ and $\boldsymbol{w}{s t j k}$ weights to 0 , to ensure identifiability, although this can also be taken care of by the prior.
To learn sparse structure, we can minimize the following objective:
\begin{aligned} J & =-\sum_{i=1}^N\left[\sum_t \log \psi_t\left(y_{i t}, \boldsymbol{x}i, \boldsymbol{v}_t\right)+\sum{s=1}^V \sum_{t=s+1}^V \log \psi_{s t}\left(y_{i s}, y_{i t}, \boldsymbol{x}i, \boldsymbol{w}{s t}\right)\right] \ & +\lambda_1 \sum_{s=1}^V \sum_{t=s+1}^V\left|\boldsymbol{w}{s t}\right|_p+\lambda_2 \sum{t=1}^V\left|\boldsymbol{v}t\right|_2^2 \end{aligned} where $\left|\boldsymbol{w}{s t}\right|_p$ is the $p$-norm; common choices are $p=2$ or $p=\infty$, as explained in ??. This method of CRF structure learning was first suggested in $[\mathrm{Sch}+08]$. (The use of $\ell_1$ regularization for learning the structure of binary MRFs was proposed in [LGK06].)

Although this objective is convex, it can be costly to evaluate, since we need to perform inference to compute its gradient, as explained in ?? (this is true also for MRFs), due to the global partition function. We should therefore use an optimizer that does not make too many calls to the objective function or its gradient, such as the projected quasi-Newton method in [Sch +09 ]. In addition, we can use approximate inference, such as loopy belief propagation (??), to compute an approximate objective and gradient more quickly, although this is not necessarily theoretically sound.

## 计算机代写|机器学习代写Machine Learning代考|Bayesian inference for undirected graph structures

Although the graphical lasso is reasonably fast, it only gives a point estimate of the structure. Furthermore, it is not model-selection consistent [Mei05], meaning it cannot recover the true graph even as $N \rightarrow \infty$. It would be preferable to integrate out the parameters, and perform posterior inference in the space of graphs, i.e., to compute $p(G \mid \mathcal{D})$. We can then extract summaries of the posterior, such as posterior edge marginals, $p\left(G_{i j}=1 \mid \mathcal{D}\right)$, just as we did for DAGs. In this section, we discuss how to do this.

If the graph is decomposable, and if we use conjugate priors, we can compute the marginal likelihood in closed form [DL93]. Furthermore, we can efficiently identify the decomposable neighbors of a graph [TG09], i.e., the set of legal edge additions and removals. This means that we can perform relatively efficient stochastic local search to approximate the posterior (see e.g. [GG99; Arm+08; SC08]).

However, the restriction to decomposable graphs is rather limiting if one’s goal is knowledge discovery, since the number of decomposable graphs is much less than the number of general undirected graphs. ${ }^4$
A few authors have looked at Bayesian inference for GGM structure in the non-decomposable case (e.g., [DGR03; WCK03; Jon+05]), but such methods cannot scale to large models because they use an expensive Monte Carlo approximation to the marginal likelihood [AKM05]. [LD08] suggested using a Laplace approximation. This requires computing the MAP estimate of the parameters for $\Omega$ under a G-Wishart prior [Rov02]. In [LD08], they used the iterative proportional scaling algorithm [SK86; HT08] to find the mode. However, this is very slow, since it requires knowing the maximal cliques of the graph, which is NP-hard in general.

In [Mog+09], a much faster method is proposed. In particular, they modify the gradient-based methods from Section 31.3.2.1 to find the MAP estimate; these algorithms do not need to know the cliques of the graph. A further speedup is obtained by just using a diagonal Laplace approximation, which is more accurate than BIC, but has essentially the same cost. This, plus the lack of restriction to decomposable graphs, enables fairly fast stochastic search methods to be used to approximate $p(G \mid \mathcal{D})$ and its mode. This approach significantly outperfomed graphical lasso, both in terms of predictive accuracy and structural recovery, for a comparable computational cost.

## 计算机代写|机器学习代写Machine Learning代考|Graphical lasso for discrete MRFs/CRFs

$$J=-\sum_{i=1}^N\left[\sum_t \log \psi_t\left(y_{i t}, \boldsymbol{x} i, \boldsymbol{v}t\right)+\sum s=1^V \sum{t=s+1}^V \log \psi_{s t}\left(y_{i s}, y_{i t}, \boldsymbol{x} i, \boldsymbol{w} s t\right)\right] \quad+\lambda_1 \sum_{s=1}^V \sum_{t=s+1}^V|\boldsymbol{w} s t|_p+\lambda_2 \sum t=1^V|\boldsymbol{v} t|_2^2$$

(指某东西的用途 $\ell_1[L G K 06]$ 中提出了用于学习二进制 MRF 结构的正则化。)

## MATLAB代写

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