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

# CS代写|机器学习代写Machine Learning代考|COMP7703 Proximal gradient method

avatest™

## avatest™帮您通过考试

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

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

We are often interested in optimizing a composite objective of the form
$$\mathcal{L}(\boldsymbol{\theta})=\mathcal{L}s(\boldsymbol{\theta})+\mathcal{L}_r(\boldsymbol{\theta})$$ where $\mathcal{L}_s$ is convex and differentiable (smooth), and $\mathcal{L}_r$ is convex but not necessarily differentiable (i.e., it may be non-smooth or “rough”). For example, $\mathcal{L}_r$ might be an $\ell_1$ norm regularization term, and $\mathcal{L}_s$ might be the NLL for linear regression (see Section 6.1.5.1). The proximal gradient method is the following update: $$\boldsymbol{\theta}{t+1}=\operatorname{prox}{\eta_t \mathcal{L}_r}\left(\boldsymbol{\theta}_t-\eta_t \nabla \mathcal{L}_s\left(\boldsymbol{\theta}_t\right)\right)$$ If $\mathcal{L}_r=I{\mathcal{C}}$, this is equivalent to projected gradient descent. If $\mathcal{L}r=0$, this is equivalent to gradient descent. If $\mathcal{L}_s=0$, this is equivalent to a proximal point method. We can create a version of the proximal gradient method with Nesterov acceleration as follows: \begin{aligned} &\tilde{\boldsymbol{\theta}}{t+1}=\boldsymbol{\theta}t+\beta_t\left(\boldsymbol{\theta}_t-\boldsymbol{\theta}{t-1}\right) \ &\boldsymbol{\theta}{t+1}=\operatorname{prox}{\eta_t \mathcal{L}r}\left(\tilde{\boldsymbol{\theta}}{t+1}-\eta_t \nabla \mathcal{L}s\left(\tilde{\boldsymbol{\theta}}{t+1}\right)\right) \end{aligned}
See e.g., [Tse08].
Now we consider the stochastic case, where $\mathcal{L}s(\boldsymbol{\theta})=\mathbb{E}\left[\mathcal{L}_s(\boldsymbol{\theta}, \boldsymbol{z})\right]$. (We assume $\mathcal{L}_r$ is deterministic.) In this setting, we can use the following stochastic update: $$\boldsymbol{\theta}{t+1}=\operatorname{prox}_{\eta_t \mathcal{L}_r}\left(\boldsymbol{\theta}_t-\eta_t \nabla \mathcal{L}_s\left(\boldsymbol{\theta}_t, \boldsymbol{z}_t\right)\right)$$
where $\boldsymbol{z}_t \sim q$. This is called the stochastic proximal gradient method. If $q$ is the empirical distribution, this is called the incremental proximal gradient method [Ber15]. Both methods can also be accelerated (see e.g., [Nit14]).

## CS代写|机器学习代写Machine Learning代考|Alternating direction method of multipliers (ADMM)

Consider the problem of optimizing $\mathcal{L}(\boldsymbol{x})=\mathcal{L}_s(\boldsymbol{x})+\mathcal{L}_r(\boldsymbol{x})$ where now both $\mathcal{L}_s$ and $\mathcal{L}_r$ may be non-smooth (but we asssume both are convex). We may want to optimize these problems independently (e.g., so we can do it in parallel), but need to ensure the solutions are consistent.

One way to do this is by using the variable splitting trick combined with constrained optimization:
$$\operatorname{minimize} \mathcal{L}s(\boldsymbol{x})+\mathcal{L}_r(\boldsymbol{z}) \text { s.t. } \boldsymbol{x}-\boldsymbol{z}=\mathbf{0}$$ This is called consensus form. The corresponding augmented Langragian is given by $$L\rho(\boldsymbol{x}, \boldsymbol{z}, \boldsymbol{y})=\mathcal{L}s(\boldsymbol{x})+\mathcal{L}_r(\boldsymbol{z})+\boldsymbol{y}^{\top}(\boldsymbol{x}-\boldsymbol{z})+\frac{\rho}{2}|\boldsymbol{x}-\boldsymbol{z}|_2^2$$ where $\rho>0$ is the penalty strength, and $\boldsymbol{y} \in \mathbb{R}^n$ are the dual variables associated with the consistency constraint. We can now perform the following block coordinate descent updates: \begin{aligned} &\boldsymbol{x}{t+1}=\underset{\boldsymbol{x}}{\operatorname{argmin}} L_\rho\left(\boldsymbol{x}, \boldsymbol{z}t, \boldsymbol{y}_t\right) \ &\boldsymbol{z}{t+1}=\underset{\boldsymbol{z}}{\operatorname{argmin}} L_\rho\left(\boldsymbol{x}{t+1}, \boldsymbol{z}, \boldsymbol{y}_t\right) \ &\boldsymbol{y}{t+1}=\boldsymbol{y}t+\rho\left(\boldsymbol{x}{t+1}-\boldsymbol{z}{t+1}\right) \end{aligned} We see that the dual variable is the (scaled) running average of the consensus errors. Inserting the definition of $L\rho(\boldsymbol{x}, \boldsymbol{z}, \boldsymbol{y})$ gives us the following more explicit update equations:
\begin{aligned} &\boldsymbol{x}{t+1}=\underset{\boldsymbol{x}}{\operatorname{argmin}}\left(\mathcal{L}_s(\boldsymbol{x})+\boldsymbol{y}_t^{\top} \boldsymbol{x}+\frac{\rho}{2}\left|\boldsymbol{x}-\boldsymbol{z}_t\right|_2^2\right) \ &\boldsymbol{z}{t+1}=\underset{\boldsymbol{z}}{\operatorname{argmin}}\left(\mathcal{L}r(\boldsymbol{z})-\boldsymbol{y}_t^{\top} \boldsymbol{z}+\frac{\rho}{2}\left|\boldsymbol{x}{t+1}-\boldsymbol{z}\right|_2^2\right) \end{aligned}
If we combine the linear and quadratic terms, we get
\begin{aligned} &\boldsymbol{x}{t+1}=\underset{\boldsymbol{x}}{\operatorname{argmin}}\left(\mathcal{L}_s(\boldsymbol{x})+\frac{\rho}{2}\left|\boldsymbol{x}-\boldsymbol{z}_t+(1 / \rho) \boldsymbol{y}_t\right|_2^2\right) \ &\boldsymbol{z}{t+1}=\underset{\boldsymbol{z}}{\operatorname{argmin}}\left(\mathcal{L}r(\boldsymbol{z})+\frac{\rho}{2}\left|\boldsymbol{x}{t+1}-\boldsymbol{z}-(1 / \rho) \boldsymbol{y}_t\right|_2^2\right) \end{aligned}

## CS代写|机器学习代写Machine Learning代考|近端梯度法

$$\mathcal{L}(\boldsymbol{\theta})=\mathcal{L}s(\boldsymbol{\theta})+\mathcal{L}r(\boldsymbol{\theta})$$的复合目标感兴趣，其中$\mathcal{L}_s$是凸的且可微的(光滑的)，$\mathcal{L}_r$是凸的但不一定可微的(即，它可能是非光滑的或“粗糙的”)。例如，$\mathcal{L}_r$可能是$\ell_1$规范正则化术语，而$\mathcal{L}_s$可能是线性回归的NLL(参见第6.1.5.1节)。近端梯度方法更新如下:$$\boldsymbol{\theta}{t+1}=\operatorname{prox}{\eta_t \mathcal{L}_r}\left(\boldsymbol{\theta}_t-\eta_t \nabla \mathcal{L}_s\left(\boldsymbol{\theta}_t\right)\right)$$如果$\mathcal{L}_r=I{\mathcal{C}}$，这相当于投影梯度下降。如果是$\mathcal{L}r=0$，这相当于梯度下降。如果是$\mathcal{L}_s=0$，这相当于近端点法。我们可以创建一个带有Nesterov加速的近端梯度方法的版本如下:\begin{aligned} &\tilde{\boldsymbol{\theta}}{t+1}=\boldsymbol{\theta}t+\beta_t\left(\boldsymbol{\theta}_t-\boldsymbol{\theta}{t-1}\right) \ &\boldsymbol{\theta}{t+1}=\operatorname{prox}{\eta_t \mathcal{L}r}\left(\tilde{\boldsymbol{\theta}}{t+1}-\eta_t \nabla \mathcal{L}s\left(\tilde{\boldsymbol{\theta}}{t+1}\right)\right) \end{aligned}

，其中$\boldsymbol{z}_t \sim q$。这叫做随机近端梯度法。如果$q$是经验分布，这被称为增量近端梯度法[Ber15]。这两种方法也可以加速(参见[Nit14])

$$\operatorname{minimize} \mathcal{L}s(\boldsymbol{x})+\mathcal{L}r(\boldsymbol{z}) \text { s.t. } \boldsymbol{x}-\boldsymbol{z}=\mathbf{0}$$这被称为共识形式。相应的增宽朗格拉日量由$$L\rho(\boldsymbol{x}, \boldsymbol{z}, \boldsymbol{y})=\mathcal{L}s(\boldsymbol{x})+\mathcal{L}_r(\boldsymbol{z})+\boldsymbol{y}^{\top}(\boldsymbol{x}-\boldsymbol{z})+\frac{\rho}{2}|\boldsymbol{x}-\boldsymbol{z}|_2^2$$给出，其中$\rho>0$为惩罚强度，$\boldsymbol{y} \in \mathbb{R}^n$为与一致性约束相关的双变量。我们现在可以执行以下块坐标下降更新:\begin{aligned} &\boldsymbol{x}{t+1}=\underset{\boldsymbol{x}}{\operatorname{argmin}} L\rho\left(\boldsymbol{x}, \boldsymbol{z}t, \boldsymbol{y}t\right) \ &\boldsymbol{z}{t+1}=\underset{\boldsymbol{z}}{\operatorname{argmin}} L\rho\left(\boldsymbol{x}{t+1}, \boldsymbol{z}, \boldsymbol{y}_t\right) \ &\boldsymbol{y}{t+1}=\boldsymbol{y}t+\rho\left(\boldsymbol{x}{t+1}-\boldsymbol{z}{t+1}\right) \end{aligned}我们看到dual变量是一致误差(按比例)的运行平均值。插入$L\rho(\boldsymbol{x}, \boldsymbol{z}, \boldsymbol{y})$的定义，我们得到以下更显式的更新方程:
\begin{aligned} &\boldsymbol{x}{t+1}=\underset{\boldsymbol{x}}{\operatorname{argmin}}\left(\mathcal{L}_s(\boldsymbol{x})+\boldsymbol{y}_t^{\top} \boldsymbol{x}+\frac{\rho}{2}\left|\boldsymbol{x}-\boldsymbol{z}_t\right|_2^2\right) \ &\boldsymbol{z}{t+1}=\underset{\boldsymbol{z}}{\operatorname{argmin}}\left(\mathcal{L}r(\boldsymbol{z})-\boldsymbol{y}_t^{\top} \boldsymbol{z}+\frac{\rho}{2}\left|\boldsymbol{x}{t+1}-\boldsymbol{z}\right|_2^2\right) \end{aligned}

\begin{aligned} &\boldsymbol{x}{t+1}=\underset{\boldsymbol{x}}{\operatorname{argmin}}\left(\mathcal{L}_s(\boldsymbol{x})+\frac{\rho}{2}\left|\boldsymbol{x}-\boldsymbol{z}_t+(1 / \rho) \boldsymbol{y}_t\right|_2^2\right) \ &\boldsymbol{z}{t+1}=\underset{\boldsymbol{z}}{\operatorname{argmin}}\left(\mathcal{L}r(\boldsymbol{z})+\frac{\rho}{2}\left|\boldsymbol{x}{t+1}-\boldsymbol{z}-(1 / \rho) \boldsymbol{y}_t\right|_2^2\right) \end{aligned}

CS代写|机器学习代写Machine Learning代考 请认准UprivateTA™. UprivateTA™为您的留学生涯保驾护航。

## MATLAB代写

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