package lbfgs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Fortran Layout.

val min : ?print:print -> ?work:work -> ?nsteps:int -> ?stop:(state -> bool) -> ?corrections:int -> ?factr:float -> ?pgtol:float -> ?n:int -> ?ofsl:int -> ?l:vec -> ?ofsu:int -> ?u:vec -> (vec -> vec -> float) -> ?ofsx:int -> vec -> float

min f_df x compute the minimum of the function f given by f_df. x is an initial estimate of the solution vector. On termination, x will contain the best approximation found. f_df x df is a function that computes f(x) and its gradiant f'(x), returns f(x) and stores f'(x) in df. The x passed to f_df x df is physically equal to the x given in min f_df x. Can raise Abnormal.

  • parameter l

    lower bound for each component of the vector x. Set l.(i) to neg_infinity to indicate that no lower bound is desired. Default: no lower bounds.

  • parameter u

    upper bound for each component of the vector x. Set u.(i) to infinity to indicate that no upper bound is desired. Default: no upper bounds.

  • parameter n

    the dimension of the space of unknowns. Default: dim x - ofsx + 1.

  • parameter ofsl

    offset for the matrix l. Default: 1.

  • parameter ofsu

    offset for the matrix u. Default: 1.

  • parameter ofsx

    offset for the matrix x. Default: 1.

  • parameter factr

    tolerance in the termination test for the algorithm. The iteration will stop when (f^k - f^{k+1})/max{ |f^k|, |f^{k+1}|, 1} <= factr*epsilon_float. Set e.g. factr to 1e12 for low accuracy, 1e7 for moderate accuracy and 1e1 for extremely high accuracy. Setting factr to 0. suppresses this termination test. Default: 1e7.

  • parameter pgtol

    The iteration will stop when max{ |proj g_i| : i = 1,..., n} <= pgtol where proj g_i is the ith component of the projected gradient. Setting pgtol to 0. suppresses this termination test. Default: 1e-5.

  • parameter corrections

    maximum number of variable metric corrections used to define the limited memory matrix. Values < 3 are not recommended, and large values of corrections can result in excessive computing time. The range 3 <= corrections <= 20 is recommended. Default: 10. This value in called M in L-BFGS-B debugging output.

  • parameter nsteps

    maximum number of steps. Default: no limitation.

  • parameter stop

    a function that tells whether we stop the computation after at the current approximation.

  • parameter print

    Tells the amount of debugging information desired. Default: No.

val max : ?print:print -> ?work:work -> ?nsteps:int -> ?stop:(state -> bool) -> ?corrections:int -> ?factr:float -> ?pgtol:float -> ?n:int -> ?ofsl:int -> ?l:vec -> ?ofsu:int -> ?u:vec -> (vec -> vec -> float) -> ?ofsx:int -> vec -> float

max f_df x computes the maximum of the function f given by f_df. x is an initial estimate of the solution vector. This function is provided for convenience and calls F.min to which the reader is referred for further explanations.

OCaml

Innovation. Community. Security.