class_docstr: Determines optimal thresholds for classifiers given constraints.
class_docstr_tok: ["Determines","optimal","thresholds","for","classifiers","given","constraints","."]
code: def get_cost(self, metrics_output, cost_ratio):
      return metrics_output["FP"] * cost_ratio + metrics_output["FN"]
  
imports: from collections.abc import Mapping, Sequence
  import math
  from typing import Optional
  import attr
  from lit_nlp.api import components
  from lit_nlp.api import dataset
  from lit_nlp.api import model
  from lit_nlp.api import types
  from lit_nlp.components import metrics
  from lit_nlp.lib import utils
  import numpy
label_desc: Use image node_id 4 for calling the Thresholder obj's underlying member method code with example usage: obj.get_cost(metrics_output, cost_ratio) and returns: unknown