# seagull_bisection: Internal bisection algorithm In seagull: Lasso, Group Lasso, and Sparse-Group Lasso for Mixed Models

## Description

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

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```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 < α < 1. The penalty term looks as follows: α * "lasso penalty" + (1-α) * "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.

## Details

The polynomial has the following form:

∑_j (|vector_j| - α weight_j λ )^2_+ - (1 - α)^2 weight^2 λ^2.

The polynomial is non-trivial, because summands are part of the sum if and only if the terms are non-negative.

## 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.

seagull documentation built on April 20, 2021, 5:06 p.m.