Learn R Programming

seagull (version 1.1.0)

seagull_bisection: Internal bisection algorithm

Description

This algorithm finds the smallest positive root of a polynomial of second degree in \(\lambda\). Bisection is an implicit algorithm, i.e., it calls itself until a certain precision is reached.

Usage

seagull_bisection(
  ROWS,
  ALPHA,
  LEFT_BORDER,
  RIGHT_BORDER,
  GROUP_WEIGHT,
  VECTOR_WEIGHTS,
  VECTOR_IN
)

Arguments

ROWS

the length of the input vectors.

ALPHA

mixing parameter of the penalty terms. Satisfies: \(0 < \alpha < 1\). The penalty term looks as follows: $$\alpha * "lasso penalty" + (1-\alpha) * "group lasso penalty".$$

LEFT_BORDER

value of the left border of the current interval that for sure harbors a root.

RIGHT_BORDER

value of the right border of the current interval that for sure harbors a root.

GROUP_WEIGHT

a multiplicative scalar which is part of the polynomial.

VECTOR_WEIGHTS

an input vector of multiplicative scalars which are part of the polynomial. This vector is a subset of the vector of weights for features.

VECTOR_IN

another input vector which is required to compute the value of the polynomial.

Value

If a certain precision (TOLERANCE) is reached, this algorithm returns the center point of the current interval, in which the root is located. Otherwise, the function calls itself using half of the initial interval, in which the root is surely located.

Details

The polynomial has the following form: $$\sum_j (|vector_j| - \alpha weight_j \lambda )^2_+ - (1 - \alpha)^2 weight^2 \lambda^2.$$ The polynomial is non-trivial, because summands are part of the sum if and only if the terms are non-negative.