class_docstr: Class implements probability to labels processing using the following ways:      choosing one or top_n indices with maximal probability or choosing any number of indices       which probabilities to belong with are higher than given confident threshold
  
  Args:
      max_proba: whether to choose label with maximal probability
      confidence_threshold: boundary probability value for sample to belong with the class (best use for multi-label)
      top_n: how many top labels with the highest probabilities to return
  
  Attributes:
      max_proba: whether to choose label with maximal probability
      confidence_threshold: boundary probability value for sample to belong with the class (best use for multi-label)
      top_n: how many top labels with the highest probabilities to return
docstr: Initialize class with given parameters
docstr_tok: ["Initialize","class","with","given","parameters"]
code: def __init__(
      self,
      max_proba: bool = None,
      confidence_threshold: float = None,
      top_n: int = None,
      is_binary: bool = False,
      **kwargs,
  ) -> None:
      """Initialize class with given parameters"""
  
      self.max_proba = max_proba
      self.confidence_threshold = confidence_threshold
      self.top_n = top_n
      self.is_binary = is_binary
  
file_path: DeepPavlov/deeppavlov/models/classifiers/proba2labels.py
imports: from logging import getLogger
  import numpy
  from deeppavlov.core.common.errors import ConfigError
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
label_desc: Use image node_id 1 to create a new Proba2Labels object from inherited base classes: Component with example: obj = Proba2Labels(max_proba, confidence_threshold, top_n, is_binary)