class_docstr: Determines optimal thresholds for classifiers given constraints.
class_docstr_tok: ["Determines","optimal","thresholds","for","classifiers","given","constraints","."]
code: def is_compatible(
      self, model: lit_model.Model, dataset: lit_dataset.Dataset
  ) -> bool:
      del dataset  # Unused by Thresholder
      return utils.spec_contains(
          model.output_spec(), types.MulticlassPreds
      )
  
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 2 for calling the Thresholder obj's underlying member method code with example usage: obj.is_compatible(model, dataset) and returns: utils