FrankWolfe

FrankWolfe()

Frank-Wolfe optimizer over an L_p ball constraint.

This optimizer is useful for smooth constrained problems, including ridge-like and lasso-like feasible regions expressed as norm balls.

Methods

Name Description
get_max_iterations get_max_iterations(self: pyensmallen._pyensmallen.FrankWolfe) -> int
get_tolerance get_tolerance(self: pyensmallen._pyensmallen.FrankWolfe) -> float
optimize optimize(self: pyensmallen._pyensmallen.FrankWolfe, objective: collections.abc.Callable[[typing.Annotated[numpy.typing.ArrayLike, numpy.float64], typing.Annotated[numpy.typing.ArrayLike, numpy.float64]], float], initial_point: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> numpy.typing.NDArray[numpy.float64]
set_max_iterations set_max_iterations(self: pyensmallen._pyensmallen.FrankWolfe, max_iterations: typing.SupportsInt | typing.SupportsIndex) -> None
set_tolerance set_tolerance(self: pyensmallen._pyensmallen.FrankWolfe, tolerance: typing.SupportsFloat | typing.SupportsIndex) -> None

get_max_iterations

FrankWolfe.get_max_iterations()

get_max_iterations(self: pyensmallen._pyensmallen.FrankWolfe) -> int

Return the maximum number of iterations.

get_tolerance

FrankWolfe.get_tolerance()

get_tolerance(self: pyensmallen._pyensmallen.FrankWolfe) -> float

Return the optimization tolerance.

optimize

FrankWolfe.optimize()

optimize(self: pyensmallen._pyensmallen.FrankWolfe, objective: collections.abc.Callable[[typing.Annotated[numpy.typing.ArrayLike, numpy.float64], typing.Annotated[numpy.typing.ArrayLike, numpy.float64]], float], initial_point: typing.Annotated[numpy.typing.ArrayLike, numpy.float64]) -> numpy.typing.NDArray[numpy.float64]

Optimize an objective from the provided starting point.

Parameters

Name Type Description Default
objective callable Callable with signature objective(params, gradient). The callable should write the gradient in place and return the scalar objective. required
initial_point ndarray Initial parameter vector. required

Returns

Name Type Description
ndarray Optimized parameter vector.

set_max_iterations

FrankWolfe.set_max_iterations()

set_max_iterations(self: pyensmallen._pyensmallen.FrankWolfe, max_iterations: typing.SupportsInt | typing.SupportsIndex) -> None

Set the maximum number of iterations.

set_tolerance

FrankWolfe.set_tolerance()

set_tolerance(self: pyensmallen._pyensmallen.FrankWolfe, tolerance: typing.SupportsFloat | typing.SupportsIndex) -> None

Set the optimization tolerance.