opt.descent_methods.feasible_init_point_descent_method

feasible_init_point_descent_method(f, x, tol, tol_backtracking, x_ast=None, p_ast=None, maxiter=30, gf=None, Hf=None, plot=True, method='Newton')[source]

Descent method to approximate minimum of function f: Rn -> R. Gradient, coordinate descent or Newton’s method (default) can be used. Gradient and Hessian of function must be provided as instances of classes, see classes.functions of opt pkg for more info.

Parameters
  • f (opt function class) – instance of class for objective function.

  • x (numpy ndarray) – initial point for descent method.

  • tol (float) – tolerance that will halt method. Controls stopping criteria.

  • tol_backtracking (float) – tolerance that will halt method. Controls value of line search by backtracking.

  • x_ast (numpy ndarray) – solution of min f_o subject to Ax <= b. It’s required that user knows the solution…

  • p_ast (float) – value of f_o(x_ast).

  • maxiter (int) – maximum number of iterations.

  • gf (opt function class) – instance of class for gradient of f.

  • Hf (opt function class) – instance of class for Hessian of f.

  • method (str) – type of method that will be used, gradient, Newton

Returns

numpy array, approximation solution of

inner iterations problem.

iteration (int): number of iterations.

Err_plot (numpy ndarray): numpy array of absolute error

between p_ast and f(x) with x approximation of x_ast. Useful for plotting.

x_plot (numpy ndarray): numpy array that containts in columns

vector of approximations. Last column contains x, approximation of solution. Useful for plotting.

Return type

x (numpy ndarray)