relf / cobyla Goto Github PK
View Code? Open in Web Editor NEWCOBYLA optimizer for Rust
License: MIT License
COBYLA optimizer for Rust
License: MIT License
Hi @relf ,
This is Dr. Zaikun Zhang from the Hong Kong Polytechnic University. Together with Professor N.I.M. Gould, I am responsible for maintaining the derivative-free optimization solvers of the late Professor M.J.D. Powell. I have developed PRIMA, which is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA.
Thank you for making COBYLA available in Rust. I note that the current version is based on the original Fortran 77 implementation. However, The Fortran 77 code of COBYLA is not maintained anymore.
Although the Fortran 77 code is truly a masterpiece, it contains many bugs, most of which are due to the language itself. For example, see Section 4.4 of our recent paper and the GitHub issues / requests listed below.
The Fortran 77 solvers may get stuck in infinite loops.
The Fortran 77 solvers may crash with segmentation faults
due to uninitialized variables that are used as indices.
Fortran 77 COBYLA may not return the best point that is evaluated; sometimes, the returned point can have a
large constraint violation even though the starting point is feasible.
To avoid the problems originating from the Fortran 77 code, I suggest you use the PRIMA implementation of Powell's solvers. PRIMA provides the modern implementation of the solvers in Fortran 2008. It fixes bugs in the original Fortran 77 code. In addition, it introduces improvements that boost the performance in terms of the number of function evaluations, which is the standard measure of computational costs in derivative-free optimization.
See the GitHub repo of PRIMA for more information. I will be glad to provide assistance if help is needed.
Thanks.
Best regards,
Zaikun Zhang, Ph.D. and Assistant Professor
Department of Applied Mathematics
The Hong Kong Polytechnic University
Hong Kong, China
Using the function fmin_cobyla the iprint variable influences the performance non-trivially. Putting iprint to 0 reduces the performance by a factor of 100x. Whereas iprint is 1,2,3 perform in line. (1 being the fastest due to less printing)
@relf thank you for the amazing crate! I just wanted to ask how to add constraints in the latest 0.3 version? I am not sure if this is missing, or unclear in the documentation. Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.