Changes between Version 2 and Version 3 of DevelopmentIdeas/ModularOptimization

Show
Ignore:
Timestamp:
04/14/07 14:16:23 (6 years ago)
Author:
mforbes
Comment:

Added directory structure and links to coding standards etc.

Legend:

Unmodified
Added
Removed
Modified
  • DevelopmentIdeas/ModularOptimization

    v2 v3  
    11= Modular Optimization and Root Finding = 
    2 This page contains discussions about a modularized optimization and root finding package. 
     2This page contains discussions about a modularized optimization and root finding package.  Please make copious changes and add lots of comments and discussions.  We should refactor once it becomes large.  Once ideas are clearly formed, they should be posted to the !SciPy-dev mailing list for comments and suggestions. 
     3 
    34[[PageOutline(5,Contents,inline)]] (Why does this macro not work to generate the table of contents?) 
     5 
     6== Module Structure == 
     7For now I am putting everything in an `moptimize` module for "Modular Optimization".  Hopefully this will be able to replace the scipy.optimize module at somepoint.  Note that coding standards, etc. can be found at the following sites: 
     8 * [http://www.python.org/dev/peps/pep-0008/ PEP 8] -- Generic python coding standards. 
     9 * TestingGuidelines -- !NumPy/!SciPy testing guidelines. 
     10 * [http://www.scipy.org/DocstringStandard SciPy/DocstringStandard] -- !NumPy/!SciPy docstring standards. 
     11 
     12{{{ 
     13moptimize  
     14    |-- __init__.py : Initialization of package (each subdir should have one) 
     15    | 
     16    |-- tests : Testing (each subdir should have one.) 
     17    | 
     18    |-- function : Function wrappers, jacobian computations etc. 
     19    | 
     20    |-- methods : General optimization methods 
     21    | 
     22   ... 
     23}}} 
    424== Interface == 
    525There should be a very simple interface with default options and methods specified to get code working.  One should then be able to refine the method to suit the particular problem.  Ultimately, it might be nice to provide tools that could try different methods and parameter values to determine the "optimum" solver for a given problem. 
     
    828{{{ 
    929#!python 
    10 from optimize import Zeros 
     30from moptimize import Zeros 
    1131 
    1232def f(x,n): 
     
    2343{{{ 
    2444#!python 
    25 from optimize.methods import Broyden 
    26 from optimize import Zeros 
     45from moptimize.methods import Broyden 
     46from moptimize import Zeros 
    2747... 
    2848method = Broyden(ftol=1e-10,xtol=1e-12) 
     
    3252{{{ 
    3353#!python 
    34 from optimize.method import Broyden 
    35 from optimize.method.criteria import RelativeValueCriterion 
     54from moptimize.method import Broyden 
     55from moptimize.method.criteria import RelativeValueCriterion 
    3656 
    3757class MyMethod(Broyden): 
     
    4363{{{ 
    4464#!python 
    45 from optimize.method import Broyden 
    46 from optimize.method.criteria import RelativeValueCriterion 
     65from moptimize.method import Broyden 
     66from moptimize.method.criteria import RelativeValueCriterion 
    4767method = Broyden(criterion=RelativeValueCriterion()) 
    4868}}} 
     
    5777It would be nice if the calling conventions for each method were as compatible as possible so that it is easy to swap different methods in an out. 
    5878==== Arguments ==== 
    59 `f` or `func`:: 
    60   Every driver routine will need to specify a function.  Should this argument be called `f` or `func`.  In !SciPy, both are used about the same amount.  (P.S. Why does the definition list Wiki syntax work here?) 
    61 `x0`:: 
     79 `f` or `func`:: 
     80  Every driver routine will need to specify a function.  Should this argument be called `f` or `func`.  In !SciPy, both are used about the same amount. 
     81 `x0`:: 
    6282  When an initial argument is supplied, the convention seems to be to use `x0`. 
    63 `ftol`, `xtol`, etc.:: 
     83 `ftol`, `xtol`, etc.:: 
    6484  These seem to be the convention for specifying tolerances.  The only problem I have with this is that I would like the option of specifying both absolute and relative tolerances.  Perhaps something like `xtol` and `xtol_rel` could be used (absolute tolerances are usually easier to deal with in general). 
    6585