Changeset 103
- Timestamp:
- 02/20/09 16:40:19 (7 years ago)
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
DEV_NOTES
r99 r103 1 1 = THINGS TO RESOLVE = 2 2 mystic/examples*/*py: 3 - convert scipy.optimize.fmin to mystic.scipy_optimize.fmin 3 - convert from scipy.optimize.fmin to mystic.scipy_optimize.fmin 4 - convert from scipy.optimize.fmin_powell to mystic.scipy_optimize.fmin_powell 4 5 */*/*py: 5 6 - move "circle" to mystic.models, and move more of "mogi" to mystic.models 7 mystic/mystic/fmin_powell.py: 8 - derive an AbstractSolver class for all solvers to inherit from 9 - add scipy solver "Brent", to _remove_ the scipy dependency (*) 10 - migrate all contents into scipy_optimize.py 11 - clean up & edit inline documentation 12 - better way to deal with callback, direc, maxfun, maxiter (?) 13 mystic/mystic/scipy_optimize.py: 14 - add the "__all__" scipy trick 15 mystic/mystic/differential_evolution.py: 16 - add ability to choose initial point 17 - use wrap_bounds instead of existing method (?) 6 18 7 19 -
mystic/examples/Make.mm
r97 r103 42 42 test_rosenbrock.py \ 43 43 test_rosenbrock2.py \ 44 test_rosenbrock3.py \ 44 45 # sam_rosenbrock.py \ 45 46 cg_rosenbrock.py \ -
mystic/examples/test_rosenbrock2.py
r102 r103 24 24 print "===================" 25 25 start = time.time() 26 from mystic.tools import VerboseSow27 stepmon = VerboseSow(10)26 from mystic.tools import Sow #VerboseSow 27 stepmon = Sow() #VerboseSow(10) 28 28 from mystic.termination import CandidateRelativeTolerance as CRT 29 29 30 #from scipy.optimize import fmin 30 31 from mystic.scipy_optimize import fmin, NelderMeadSimplexSolver 31 32 #print fmin(rosen,x0,retall=0,full_output=0) … … 34 35 solver.SetStrictRanges(min,max) 35 36 solver.enable_signal_handler() 36 solver.Solve(rosen,termination=CRT(xtol= 1e-5),StepMonitor=stepmon)37 solver.Solve(rosen,termination=CRT(xtol=4e-5),StepMonitor=stepmon,disp=1) 37 38 print solver.Solution() 38 39 -
mystic/mystic/Make.mm
r98 r103 29 29 differential_evolution.py \ 30 30 scipy_optimize.py \ 31 fmin_powell.py \ 31 32 termination.py \ 32 33 strategy.py \ -
mystic/mystic/__init__.py
r98 r103 16 16 # solvers 17 17 import differential_evolution, scipy_optimize 18 import fmin_powell #FIXME: move to scipy_optimize after remove scipy dependency 18 19 19 20 # strategies, termination conditions -
mystic/mystic/scipy_optimize.py
r102 r103 244 244 if maxfun is None: 245 245 maxfun = N * 200 246 self._maxiter = maxiter #XXX: better to just copy the code? 247 self._maxfun = maxfun #XXX: better to just copy the code? 246 248 247 249 rho = 1; chi = 2; psi = 0.5; sigma = 0.5; … … 402 404 403 405 # code below here pushes output to scipy.optimize.fmin interface 404 x = list(solver.bestSolution) 406 #x = list(solver.bestSolution) 407 x = solver.bestSolution 405 408 fval = solver.bestEnergy 406 409 warnflag = 0 … … 409 412 allvecs = [] 410 413 for i in range(iterations): 411 allvecs.append(list(stepmon.x[i][0])) 412 413 if fcalls >= maxfun: 414 #allvecs.append(list(stepmon.x[i][0])) 415 allvecs.append(stepmon.x[i][0]) 416 417 if fcalls >= solver._maxfun: 414 418 warnflag = 1 415 elif iterations >= maxiter:419 elif iterations >= solver._maxiter: 416 420 warnflag = 2 417 421
Note: See TracChangeset
for help on using the changeset viewer.