ternary_search#
- mlquantify.utils.method.ternary_search(left, right, f, eps=0.0001)[source]#
This function applies Ternary search
- Parameters:
- leftfloat
The left boundary of the search interval.
- rightfloat
The right boundary of the search interval.
- ffunction
The function to optimize.
- epsfloat, optional
The desired precision of the result. Defaults to 1e-4.
- Returns:
- float
The value of the argument that minimizes the function.