FW: Frank-Wolfe algorithm

View source: R/optim_functions.R

FWR Documentation

Frank-Wolfe algorithm

Description

Implements the Frank-Wolfe optimization algorithm to iteratively refine a convex combination function psi. At each iteration, a new solution theta is computed via stochastic gradient descent (SGD) and added to the convex combination in the form 2 \cdot \text{expit}(X \theta) - 1.

Usage

FW(
  X,
  delta_Mu,
  delta_Nu,
  lambda,
  alpha = 0.1,
  beta = 0.05,
  centered = FALSE,
  precision = 0.05,
  verbose = TRUE
)

Arguments

X

A matrix of covariates of size n x d (input data in ⁠[0,1]⁠).

delta_Mu

A function of X that determines the contrast between primary outcomes.

delta_Nu

A function of X that determines the contrast between adverse event outcomes.

lambda

A non-negative numeric scalar controlling the penalty for violating the constraint.

alpha

A numeric scalar representing the constraint tolerance (in ⁠[0,1/2]⁠, 0.1 by default).

beta

A non-negative numeric scalar controlling the sharpness of the probability function (0.05 by default).

centered

A logical (FALSE by default) indicating whether to center the policy.

precision

A numeric scalar defining the desired convergence precision (0.05 by default). The number of Frank-Wolfe iterations (K) is inversely proportional to this value, calculated as 1/precision.

verbose

A logical value indicating whether to print progress updates. Default is TRUE.

Value

A numeric matrix containing the optimized parameter theta, where each row represents the k-th theta solution at iteration k.


PLUCR documentation built on March 30, 2026, 5:08 p.m.