如何实现凸优化包?
我完全意识到凸优化包,就像线性代数包一样,应该是您使用的东西,而不是实现的东西。然而,纯粹出于教育目的——有没有什么好的资源——关于如何实现凸优化包的链接/书籍? (就像具有二次约束的二次规划?)
谢谢!
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
任何一本关于凸优化的优秀教科书都会有你正在寻找的东西。一个这样的免费但很棒的资源就在这里: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.
文章中有一篇相关的文章。 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.
这取决于你要做什么,但你应该去找教授。在您现在所在的大学或您毕业的大学中从事数学优化方面的工作,您应该直接询问他。
我实现了几个简化为凸优化问题的求解器(http://cs229.stanford.edu/proj2017/) - cvx4ml 的工作速度比 SkLearn 的类似解决方案更快,我通过了 Stephen Boyd 的 24 小时考试,所以我可以为你提供建议,并描述你的非常粗略的计划:
所以你将创建自己的包我将编写分步说明:
为非负正交圆锥实现自定义简单圆锥求解器。这取决于你要做什么。
6.a - 编写基于内点法的求解器。
6.b - 编写支持分布式优化的求解器
6.c - 基于某种投影次梯度方法编写求解器。
改进它以支持其他锥体
如果您想达到 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:
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.
Improve it to support other cones
And if you want to be at level of CVXPY then
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.