Documentation of 'jsat.math.optimization.LineSearch' Java class
LineSearch
jsat.math.optimization

Interface LineSearch

  • All Known Implementing Classes:
    BacktrackingArmijoLineSearch, WolfeNWLineSearch


    public interface LineSearch
    Line search defines a method of minimizing a function φ(α) = f(xp) where α > 0 is a scalar value, and x and p are fixed vectors.

    Different line search methods may or may not use all the input variables.

    The LineSearch is allowed to maintain a history of update values to use on future calls. For this reason, a clone of the line search should be used for each new optimization problem.
    • Method Detail

      • lineSearch

        default double lineSearch(double alpha_max,
                                  Vec x_k,
                                  Vec x_grad,
                                  Vec p_k,
                                  Function f,
                                  FunctionVec fp,
                                  double f_x,
                                  double gradP,
                                  Vec x_alpha_pk,
                                  double[] fxApRet,
                                  Vec grad_x_alpha_pk)
        Attempts to find the value of α that minimizes f(xp)
        Parameters:
        alpha_max - the maximum value for α to search for
        x_k - the initial value to search from
        x_grad - the gradient of ∇ f(xk)
        p_k - the direction update
        f - the function to minimize the value of f(xk + α pk)
        fp - the gradient of f, ∇f(x), may be null depending upon the linesearch method
        f_x - the value of f(xk), or Double.NaN if it needs to be computed
        gradP - the value of ∇f(xk)Tpk, or Double.NaN if it needs to be computed
        x_alpha_pk - the location to store the value of xk + α pk
        fxApRet - an array to store the computed result of f(xk + α pk) in the first index contain. May be null and the value will not be returned
        grad_x_alpha_pk - location to store the value of ∇ f(xkα+pk). May be null, local storage will be allocated if needed
        Returns:
        the value of α that satisfies the line search in minimizing f(xk + α pk)
      • lineSearch

        double lineSearch(double alpha_max,
                          Vec x_k,
                          Vec x_grad,
                          Vec p_k,
                          Function f,
                          FunctionVec fp,
                          double f_x,
                          double gradP,
                          Vec x_alpha_pk,
                          double[] fxApRet,
                          Vec grad_x_alpha_pk,
                          boolean parallel)
        Attempts to find the value of α that minimizes f(xp)
        Parameters:
        alpha_max - the maximum value for α to search for
        x_k - the initial value to search from
        x_grad - the gradient of ∇ f(xk)
        p_k - the direction update
        f - the function to minimize the value of f(xk + α pk)
        fp - the gradient of f, ∇f(x), may be null depending upon the line search method
        f_x - the value of f(xk), or Double.NaN if it needs to be computed
        gradP - the value of ∇f(xk)Tpk, or Double.NaN if it needs to be computed
        x_alpha_pk - the location to store the value of xk + α pk
        fxApRet - an array to store the computed result of f(xk + α pk) in the first index contain. May be null and the value will not be returned
        grad_x_alpha_pk - location to store the value of ∇ f(xkα+pk). May be null, local storage will be allocated if needed
        parallel - true if this line search should be done using multiple cores, or false to be single threaded.
        Returns:
        the value of α that satisfies the line search in minimizing f(xk + α pk)
      • updatesGrad

        boolean updatesGrad()
        When performing the linear search step some line searches may or may not use the gradient information. If the gradient information is used and updated, this method will return true. If not the given vector will be unused and not updated, and this method will return false
        Returns:
        true if the grad_x_alpha_pk parameter of lineSearch will be up-to-date after the call, or false if the gradient value will need to be computed after.
      • clone

        LineSearch clone()
        Returns a clone of the line search object
        Returns:
        a clone of the line search object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.