Comments (8)
Hi @pangtai6,
Good questions, in reply:
- You can only set the parameters and values printed by
pycutest.print_available_sif_params()
, so for example for BROYDN7D it tells us that
>>> pycutest.print_available_sif_params('BROYDN7D')
Parameters available for problem BROYDN7D:
N/2 = 5 (int, n=10 original value)
N/2 = 25 (int, n=50)
N/2 = 50 (int, n=100)
N/2 = 250 (int, n=500)
N/2 = 500 (int, n=1000)
N/2 = 2500 (int, n=5000) [default]
N/2 = 5000 (int, n=10000)
End of parameters for problem BROYDN7D
which means we can only set N/2
to one of the values listed:
>>> problem = pycutest.import_problem('BROYDN7D', sifParams={'N/2':250})
>>> problem.n
500
if you want other values of N/2 you have to put them into the BROYDN7D.SIF file (this is how CUTEst is designed).
- Newton's method is not 'globally convergent' meaning that it needs a 'globalisation strategy' to ensure that it converges from any starting point for nonlinear problems. This can be linesearch (or trust-region, etc) but for linesearch you need a backtracking Armijo linesearch at minimum: a fixed step size is not guaranteed to converge from any starting point for general nonlinear problems (see the Line Search chapter of Nocedal & Wright's Numerical Opimization for details).
from pycutest.
Thank you very much for your clarity. Wish you a happy life.
from pycutest.
Excuse me, why can't I find the local minimum by changing the initial point here, using the line search Newton method?
from pycutest.
For your example code, you need to resample the gradient/Hessian at each iteration after you have taken your step (after line 36), so the new step calculation in the next loop iteration uses the gradient/Hessian at the new value of x.
from pycutest.
When I import the numpy and scipy, the program will report an error. The result is as follows:
exercise2.py.zip
The zip folder contains the code.
Could you help me, please?
from pycutest.
I see that you're running IPython in the Python Console, please change this to your standard Python Interpreter that you installed pycutest with:
https://www.jetbrains.com/help/pycharm/using-consoles.html#python-console-settings
from pycutest.
I see that you're running IPython in the Python Console, please change this to your standard Python Interpreter that you installed pycutest with:
https://www.jetbrains.com/help/pycharm/using-consoles.html#python-console-settings
I tried it out, and the setup in pycharm was ok, I found it was acceptable not to use the "scipy" package alone, and the "pycutest" instruction worked fine; Similarly, the commands in the "scipy" package will work fine without calling "pycutest". There might be a conflict between the two commands.
from pycutest.
I found the problem and corrected the program. Thank you very much for your reply.
from pycutest.
Related Issues (20)
- 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
- Setuptools not installed by default HOT 3
- Switch to `pyproject.toml`
- Python Headers on Ubuntu HOT 3
- Inconsistency in problem dimensions between description and problem HOT 6
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.