Content feed of the TransferLab — appliedAI Institute 2024年11月27日
optimagic: unifying the numerical optimization ecosystem in Python
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

OptiMagic使领域专家无需成为算法专家即可解决复杂非线性优化问题。它整合多种算法,提供统一界面,具有多种功能特性,且在不断发展完善。

OptiMagic整合多种算法包,提供统一界面,方便用户切换。

具有多种功能,如绘图工具、灵活的参数设置等。

正在进行多项增强提案,如静态类型、与SciPy对齐等。

optimagic wants to enable domain experts to solve difficult nonlinear optimizationproblems without having to become algorithm experts. Since there isno universally efficient optimizer, this requiresaccess to many different algorithms as well as diagnostic tools to compare how wellan algorithm works on a given problem.To achieve this, we wrap optimizers from SciPy, NLopt, Pygmo, and many other packagesand give them a unified and familiar minimize interface. Since our minimize functionis a superset of SciPy’s, the switch to optimagic is effortless for many users.Besides a seamless switch between different optimizers, optimagicprovides the following features:Plotting tools to visualize the history of one or several optimizers on a givenproblem.Parameters don’t have to be flat arrays. Use (nested) dictionaries, NamedTuples orwhatever is best for your problem.Simple parallelization on the algorithm level or during the calculation of numericalderivatives.Error handling and persistent logging to deal with or diagnose numerical instabilitiesin objective functions.Compatibility with automatic differentiation via JAX.For more details and examples, have a look at this tutorial.optimagic was formerly called estimagic, because it also provides functionality toperform statistical inference on estimated parameters. estimagic is now a subpackageof optimagic.Install withpip install optimagicor via conda-forge withconda install -c conda-forge optimagicFor details and instructions, check out the documentation.RoadmapWe are currently working on the following topics:Enhancement Proposal 2: Static typingThis enhancement proposal explains the adoption of static typing in optimagic.It has three major goals:Users will benefit from IDE tools such as easier discoverability of options andautocompletion.Developers and users will find code easier to read due to type hints.The codebase will become more robust due to static type checking and use of strictertypes in internal functions.The detailed enhancement proposal can be found here. It containsseveral improvements that go beyond the adoption of static typing such as a betterintegration with JAX and a better interface for least-squares problems.All breaking changes of this enhancement proposal have been implemented with version0.5.0. The remaining changes will be implemented until version 0.6.0.Enhancement Proposal 3: Alignment with SciPyThis enhancement proposal describes the changes needed to become a superset ofscipy.optimize.minimize. After it is completed, all code that was written for SciPy’sminimize function will also run with optimagic. This lowers switching costs and letsusers gradually adopt the advanced features of optimagic.The detailed enhancement proposal can be found hereAll breaking changes of this enhancement proposal have been implemented with version0.5.0. The remaining changes will be implemented until version 0.6.0.Wrapping more optimizersWe are open for requests to add any optimizer with Python bindings. We are currentlyplanning to wrap the following libraries or optimizers:Acknowledgmentsoptimagic originated in the Open Source Economics group at theUniversity of Bonn in 2019. Since 2022 it is NumFocus affiliated. Optimagic hasreceived funding from the University of Bonn, TRA Modeling,and Hoover Institution.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

OptiMagic 非线性优化 算法整合 功能特性
相关文章