如何实现凸优化包?

发布于 2024-09-08 06:37:31 字数 117 浏览 1 评论 0原文

我完全意识到凸优化包,就像线性代数包一样,应该是您使用的东西,而不是实现的东西。然而,纯粹出于教育目的——有没有什么好的资源——关于如何实现凸优化包的链接/书籍? (就像具有二次约束的二次规划?)

谢谢!

I fully realize that Convex Optimization packages, like Linear Algebra packages, should be things you use, not implement. However, for purely education purposes -- is there any good resource -- link / book on how to implement a convex optimization package? (like for quadratic programs with quadratic constraints?)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉城 2024-09-15 06:37:31

任何一本关于凸优化的优秀教科书都会有你正在寻找的东西。一个这样的免费但很棒的资源就在这里:CO Book。请注意,正如您正确提到的那样,实现本书中提到的算法肯定需要线性代数库,您也可能选择也可能不选择实现。

Any good textbook on convex optimization would have stuff you are looking for. One such free, but great resource is here: CO Book. Note that, as you correctly mention, implementing algorithms mentioned in this book will definitely need linear algebra libraries, which you may or may not choose to implement as well.

最好是你 2024-09-15 06:37:31

文章中有一篇相关的文章。 mathprog.org/" rel="nofollow noreferrer">Optima,数学优化协会的时事通讯 a> 称为“使用 COIN-OR 快速开发开源 Minlp 求解器”。它描述了使用一些 coin-or 包构建非线性求解器。大多数硬币或东西都是用 C++ 编写的。

对于 Python,您可以考虑使用 numpy 中提供的线性代数数据结构和算法。相关的 scipy 包有一些非线性优化器,但没有专门针对凸优化的。

最后,您可以查看 Boyd 的 GPL 基于 python 的凸优化器 cvxopt 来了解什么样的任务你已经领先了。

There's a relevant article in Optima, a newsletter of the mathematical optimization society called "Rapid Development of an Open-source Minlp Solver with COIN-OR". It describes building a nonlinear solver using the some of the coin-or packages. Most of the coin-or stuff is written in c++.

For python, you might consider using the linear algebra data structure and algorithms available in numpy. The related scipy package has some nonlinear optimizers but nothing specific for convex optimization.

And last, you can look at the Boyd's GPL's python-based convex optimizer cvxopt to get an idea of what kind of task you have ahead of you.

美人迟暮 2024-09-15 06:37:31

这取决于你要做什么,但你应该去找教授。在您现在所在的大学或您毕业的大学中从事数学优化方面的工作,您应该直接询问他

我实现了几个简化为凸优化问题的求解器(http://cs229.stanford.edu/proj2017/) - cvx4ml 的工作速度比 SkLearn 的类似解决方案更快,我通过了 Stephen Boyd 的 24 小时考试,所以我可以为你提供建议,并描述你的非常粗略的计划:

所以你将创建自己的包我将编写分步说明:

  1. 您应该创建用于处理密集矩阵/向量的库
  2. 您应该创建用于处理稀疏矩阵/向量的库
  3. 实现大约 20 种不同的算法来求解线性方程组(因为根据情况您将需要不同的)
  4. 介绍如何在您的编程语言或您创建的系统中描述约束、功能域等的概念。
  5. 实现多范数和双范数评估,一些因式分解技术,如 LU、Cholesky。
  6. 为非负正交圆锥实现自定义简单圆锥求解器。这取决于你要做什么。
    6.a - 编写基于内点法的求解器。
    6.b - 编写支持分布式优化的求解器
    6.c - 基于某种投影次梯度方法编写求解器。

  7. 改进它以支持其他锥体

  8. 通过步骤“5”增强您的求解器

如果您想达到 CVXPY 的水平,那么

  1. 像 CVXPY 那样实现程序描述的解析并将问题转换为圆锥形。

ps 如果您对其中一些主题感到草率,那么:

  • 阅读教授写的线性代数书。来自你的大学

  • 在 youtube 中查看 EE263 with S.Boyd、EE364A with S.Boyd、EE364B with S.Boyd。

It depends on what you're going, but you should go to prof. in math optimization in your university in which you're right now or which you graduated and you should ask him directly.

I implemented solvers for several problems reduced to convex optimization (http://cs229.stanford.edu/proj2017/) - cvx4ml which works faster then similar solution from SkLearn, and I passed 24 hour exam to Stephen Boyd, so I can give advice what you can do and describe for your very rough plan:

So you're going to create own package I will write step-by-step instruction:

  1. You should create library for work with dense matrix/vectors
  2. You should create library for work with sparse matrix/vectors
  3. Implement around 20 different algorithms to solve system of linear equations (because depend on situation you will need different of them)
  4. Introduce concepts how describe constraints, function domain, etc in your programming language or you system that you created.
  5. Implement several norms and dual norms evaluation, some factorization technics like LU, Cholesky.
  6. Implement custom simple conic solver for non-negative orthont cone. And it depends on what you're going todo.
    6.a - write solver based on interior point method.
    6.b - write solver with support distributed optimization
    6.c - write solver based on some projected subgradient method.

  7. Improve it to support other cones

  8. Enhanced you solver with step "5"

And if you want to be at level of CVXPY then

  1. Implement parsing of program description like CVXPY do and transform problem into conic form.

p.s. If you feel sloppy with some of this topics, then:

  • Read linear algebra book which wrote prof. from your university

  • Look in the youtube into EE263 with S.Boyd, EE364A with S.Boyd, EE364B with S.Boyd.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文