Skip to main content
Ctrl+K

mlquantify 0.1.1 documentation

  • Install
  • User Guide
  • API
  • GitHub
  • Install
  • User Guide
  • API
  • GitHub

Section Navigation

  • mlquantify
    • set_arguments
  • mlquantify.base
    • Quantifier
    • AggregativeQuantifier
    • NonAggregativeQuantifier
  • mlquantify.classification.methods
    • PWKCLF
  • mlquantify.evaluation.measures
    • process_inputs
    • absolute_error
    • mean_absolute_error
    • kullback_leibler_divergence
    • squared_error
    • mean_squared_error
    • normalized_absolute_error
    • normalized_kullback_leibler_divergence
    • relative_absolute_error
    • normalized_relative_absolute_error
  • mlquantify.evaluation.protocol
    • Protocol
    • APP
    • NPP
  • mlquantify.methods.aggregative
    • CC
    • EMQ
    • FM
    • GAC
    • GPAC
    • PCC
    • PWK
    • ACC
    • MAX
    • MS
    • MS2
    • PACC
    • T50
    • X_method
    • DyS
    • DySsyn
    • HDy
    • SMM
    • SORD
  • mlquantify.methods.meta
    • Ensemble
  • mlquantify.methods.non_aggregative
    • HDx
  • mlquantify.model_selection
    • GridSearchQ
  • mlquantify.utils.general
    • convert_columns_to_arrays
    • generate_artificial_indexes
    • generate_artificial_prevalences
    • get_real_prev
    • load_quantifier
    • make_prevs
    • normalize_prevalence
    • parallel
    • round_protocol_df
    • get_measure
    • get_method
  • mlquantify.utils.method
    • sqEuclidean
    • probsymm
    • topsoe
    • hellinger
    • get_scores
    • getHist
    • MoSS
    • ternary_search
    • compute_table
    • compute_tpr
    • compute_fpr
    • adjust_threshold
  • API Reference
  • mlquantify.utils.method
  • ternary_search

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.

previous

MoSS

next

compute_table

On this page
  • ternary_search

This Page

  • Show Source