def __init__(self, beta_type=BetaTypes.HestenesStiefel, orth_value=np.inf, linesearch=None, *args, **kwargs): """ Instantiate gradient solver class. Variable attributes (defaults in brackets): - beta_type (BetaTypes.HestenesStiefel) Conjugate gradient beta rule used to construct the new search direction - orth_value (numpy.inf) Parameter for Powell's restart strategy. An infinite value disables this strategy. See in code formula for the specific criterion used. - linesearch (LineSearchAdaptive) The linesearch method to used. """ super(ConjugateGradient, self).__init__(*args, **kwargs) self._beta_type = beta_type self._orth_value = orth_value if linesearch is None: self._linesearch = LineSearchAdaptive() else: self._linesearch = linesearch self.linesearch = None
def __init__(self, beta_type=BetaTypes.HestenesStiefel, orth_value=np.inf, linesearch=None, *args, **kwargs): """ Instantiate gradient solver class. Parameters ---------- Optional parameters ------------------- :param beta_type: Conjugate gradient beta rule used to construct the new search direction :param orth_value: parameter for Powell's restart strategy. An infinite value disables this strategy. See in code formula for the specific criterion used. :param linesearch: linesearch method :param args: additional arguments :param kwargs: additional arguments """ super(ConjugateGradientRobust, self).__init__(*args, **kwargs) self._beta_type = beta_type self._orth_value = orth_value if linesearch is None: self._linesearch = LineSearchAdaptive() else: self._linesearch = linesearch self.linesearch = None
def __init__(self, beta_type=BetaTypes.HestenesStiefel, orth_value=np.inf, linesearch=None, *args, **kwargs): """Instantiate gradient solver class. Args: beta_type (object): Conjugate gradient beta rule used to construct the new search direction. orth_value (float): Parameter for Powell's restart strategy. An infinite value disables this strategy. See in code formula for the specific criterion used. - linesearch (object): The linesearch method to used. """ super(ConjugateGradientMS, self).__init__(*args, **kwargs) self._beta_type = beta_type self._orth_value = orth_value if linesearch is None: self._linesearch = LineSearchAdaptive() else: self._linesearch = linesearch # LineSearchBackTracking() self.linesearch = None