Changeset 82 for tests/test_zimmermann.py
- Timestamp:
- 01/26/09 16:12:08 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/test_zimmermann.py
r81 r82 63 63 64 64 from mystic import Sow 65 from mystic.nelder_mead import fmin 65 from mystic.scipy_optimize_fmin import NelderMeadSimplexSolver as fmin 66 from mystic.nmtools import IterationRelativeError as IRE 66 67 67 68 simplex = Sow() 68 69 esow = Sow() 69 sol = fmin(CostFunction, [random.uniform(0,5) for j in range(ND)], EvaluationMonitor = esow, retall = True, StepMonitor = simplex) 70 #print "solution: ", sol 70 xinit = [random.uniform(0,5) for j in range(ND)] 71 72 solver = fmin(len(xinit)) 73 solver.SetInitialPoints(xinit) 74 killme = IRE(1e-4,1e-4) 75 solver.Solve(CostFunction, killme, EvaluationMonitor = esow, StepMonitor = simplex) 76 sol = solver.Solution() 77 print "solution: ", sol 71 78 72 79 # end of file
Note: See TracChangeset
for help on using the changeset viewer.