Newton-CG Optimizer

The Newton-CG optimizer minimizes the convex function iteratively using its gradient and hessian-product operator.

Operation

Computational methods

dense

dense

Mathematical Formulation

Refer to Developer Guide: Newton-CG.

Programming Interface

All types and functions are declared in the oneapi::dal::newton_cg namespace.

Descriptor

template<typename Float = float, typename Method = method::by_default, typename Task = task::by_default>
class descriptor
Template Parameters
  • Float – The floating-point type that the algorithm uses for intermediate computations. Can be float or double.

  • Method – Tag-type that specifies an implementation of algorithm. Can be method::dense.

  • Task – Tag-type that specifies the type of the problem to solve. Can be task::compute.

Constructors

descriptor(double tol = 1e-4, std::int64_t maxiter = 100)

Creates a new instance of the class with the given tol and maxiter property values.

Properties

std::int64_t max_iteration

The maximum iteration number.

Getter & Setter
std::int64_t get_max_iteration() const
auto & set_max_iteration(std::int64_t maxiter)
Invariants
maxiter >= 0
double tolerance

The convergence tolerance.

Getter & Setter
double get_tolerance() const
auto & set_tolerance(double tol)
Invariants
tol >= 0.0

Method Tags

struct dense
using by_default = dense

Task Tags

struct compute
using by_default = compute