Comments (4)
Thank you for the feature request, the lack of a direct function for accessing the gradient is not very user-friendly. We are just copying the CUTEst interfaces here, but I agree this would be desirable and relatively easy to do (essentially a wrapper around problem.obj
).
@lindonroberts what are your thoughts on this?
from pycutest.
I agree this would be useful, and perhaps a similar interface to problem.cons
to just extract constraint gradients.
The only wrinkle I can see is that there is the internal CUTEst counter of objective/gradient/Hessian evaluations in problem.report()
that would need adjusting. Perhaps a tally of how many times problem.grad
is called, and subtract that from the total objective evaluations (since that information was ignored)?
from pycutest.
That's an interesting design choice in CUTEst, but I can see why it was made. Many (most? all?) optimization algorithms evaluate objective & gradient (e.g., steepest descent) or gradient & Hessian (e.g., Newton) at the same time. In the code I've been developing, I already extract the gradient as @jfowkes describes so this doesn't really bother me.
from pycutest.
I have realised there is a CUTEst_ugr
function for accessing the objective gradient and a CUTEst_cigr
function for accessing the constrained gradient. I will add a PyCUTEst interface to these in due course. Apologies for missing this.
from pycutest.
Related Issues (20)
- macOS CI runners have stopped working HOT 1
- How to release RAM HOT 5
- path problem in mac HOT 1
- An option or function to get all the problems compiled and saved, so that they do not need to be compiled on the fly HOT 8
- I want to specify the dimension of the unconstrained optimization problem, how do I set that? HOT 8
- PyCUTEst v1.5.0 breaks existing cached problems HOT 12
- module 'pycutest_cache_holder.X' has no attribute 'setup' HOT 1
- error when Installing on Linux HOT 10
- Better handling of incompatible Fortran compilers
- System state isn't restored after loading failure (`FileNotFoundError`) HOT 2
- How to find problems with equality constraints only? HOT 5
- Support for ARM-based Mac HOT 2
- import_problem HOT 5
- Release of memory HOT 6
- Facing error when attempting to run the given example HOT 2
- Conversion of an array with ndim > 0 to a scalar is deprecated and will error in future
- Pycutest with Knitro solver HOT 1
- Add new CUTEst routines for the John function HOT 2
- Add missing sparse routines (sobj, sgrad)
- Compilation in parallel on macOS does not work HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycutest.