Exemple #1
0
  def defaultParameters():
    """Default parameters that can subsequently be modified and passed to the constructor.

    :param ITER_MAX: maximum number of minimization iterations before failure
    :param mu: Morozov discrepancy principle scaling paramter
    :param cg_reset: number of iterations before a conjugate gradient reset (0=default)
    :param thetaMin: smallest acceptable goal improvment for linearized step
    :param thetaMax: maximum attempted goal improvment for linearized step
    :param kappaTrust: factor to shrink :data:`theta` by when linearized step fails
    :param rhoLow: linearized step fails when goal improves by less than :data:`rhoLow`*:data:`theta`
    :param rhoHigh: linearized step is very successful when goal improves by more than :data:`rhoHigh`*:data:`theta`
    :param verbose: True if extra logging output is desired
    """
    params = Parameters('InvIGN', ITER_MAX=200, mu=1.1, cg_reset=0, thetaMin=2**(-20), thetaMax=0.5, 
                                        kappaTrust=0.5, rhoLow=0.1, rhoHigh=0.5, verbose=False)

    lsparams = linesearchHZ.LinesearchHZ.defaultParameters()
    lsparams.sigma=0.1
    lsparams.delta=0.05
    lsparams.rename('linesearch')
    params.add(lsparams)

    linearparams = KrylovSolver.defaultParameters()
    linearparams.mu=1.
    linearparams.rename('linearsolver')
    params.add(linearparams)
    return params
Exemple #2
0
 def defaultParameters():
   """Parameters:
     
     * ITER_MAX: maximum iteration count
     * mu: scaling parameter for Morozov discrepency principle.
     * cg_reset: reset conjugate gradient method after this many iterations.  Zero for a default behaviour.
     * steepest_descent: Use steepest descent rather than full NLCG
     * linesearch: parameters to be passed to the linesearch algorithm
     * verbose: print out extra output
   """
   params = Parameters('InvNLCG', ITER_MAX=200, mu=1.1, cg_reset=0, deriv_eps=1, steepest_descent=False, verbose=False)
   lsparams = linesearchHZ.LinesearchHZ.defaultParameters()
   lsparams.sigma=0.1
   lsparams.delta=0.05
   lsparams.rename('linesearch')
   params.add(lsparams)
   return params
Exemple #3
0
    def defaultParameters():
        """Default parameters that can subsequently be modified and passed to the constructor.

    :param ITER_MAX: maximum number of minimization iterations before failure
    :param mu: Morozov discrepancy principle scaling paramter
    :param cg_reset: number of iterations before a conjugate gradient reset (0=default)
    :param thetaMin: smallest acceptable goal improvment for linearized step
    :param thetaMax: maximum attempted goal improvment for linearized step
    :param kappaTrust: factor to shrink :data:`theta` by when linearized step fails
    :param rhoLow: linearized step fails when goal improves by less than :data:`rhoLow`*:data:`theta`
    :param rhoHigh: linearized step is very successful when goal improves by more than :data:`rhoHigh`*:data:`theta`
    :param verbose: True if extra logging output is desired
    """
        params = Parameters('InvIGN',
                            ITER_MAX=200,
                            mu=1.1,
                            cg_reset=0,
                            thetaMin=2**(-20),
                            thetaMax=0.5,
                            kappaTrust=0.5,
                            rhoLow=0.1,
                            rhoHigh=0.5,
                            verbose=False)

        lsparams = linesearchHZ.LinesearchHZ.defaultParameters()
        lsparams.sigma = 0.1
        lsparams.delta = 0.05
        lsparams.rename('linesearch')
        params.add(lsparams)

        linearparams = KrylovSolver.defaultParameters()
        linearparams.mu = 1.
        linearparams.rename('linearsolver')
        params.add(linearparams)
        return params
Exemple #4
0
 def defaultParameters():
     """Parameters:
   
   * ITER_MAX: maximum iteration count
   * mu: scaling parameter for Morozov discrepency principle.
   * cg_reset: reset conjugate gradient method after this many iterations.  Zero for a default behaviour.
   * steepest_descent: Use steepest descent rather than full NLCG
   * linesearch: parameters to be passed to the linesearch algorithm
   * verbose: print out extra output
 """
     params = Parameters('InvNLCG',
                         ITER_MAX=200,
                         mu=1.1,
                         cg_reset=0,
                         deriv_eps=1,
                         steepest_descent=False,
                         verbose=False)
     lsparams = linesearchHZ.LinesearchHZ.defaultParameters()
     lsparams.sigma = 0.1
     lsparams.delta = 0.05
     lsparams.rename('linesearch')
     params.add(lsparams)
     return params
Exemple #5
0
 def defaultParameters():
     return Parameters('KrylovSolver',
                       ITER_MAX=200,
                       mu=1.1,
                       cg_reset=0,
                       steepest_descent=False)