class_docstr: A Partition is a set of non-overlapping bins of the same type associated with the same feature
class_docstr_tok: ["A","Partition","is","a","set","of","non-overlapping","bins","of","the","same","type","associated","with","the","same","feature"]
docstr: Computes the sub-score for the feature associated with this partition. This score is given by the sub-score of
  the first bin in the partition to which the feature value belongs. Raises ValueError if the feature value does
  not belong to any of the bins.
  
  @param assignment: dict mapping variable name to value
  @return: float sub-score associated with this partition.
docstr_tok: ["Computes","the","sub-score","for","the","feature","associated","with","this","partition",".","This","score","is","given","by","the","sub-score","of","the","first","bin","in","the","partition","to","which","the","feature","value","belongs",".","Raises","ValueError","if","the","feature","value","does","not","belong","to","any","of","the","bins",".","@","param","assignment",":","dict","mapping","variable","name","to","value","@","return",":","float","sub-score","associated","with","this","partition","."]
code: def evaluate(self, assignment: Dict[str, Any]) -> float:
      """
      Computes the sub-score for the feature associated with this partition. This score is given by the sub-score of
      the first bin in the partition to which the feature value belongs. Raises ValueError if the feature value does
      not belong to any of the bins.
  
      @param assignment: dict mapping variable name to value
      @return: float sub-score associated with this partition.
      """
      for curr_bin in self.bins:
          if curr_bin.contains(assignment):
              return curr_bin.evaluate(assignment)
      raise ValueError(
          'Value "{}" of the feature does not belong to any of the bins'.format(
              self._feature.evaluate(assignment)
          )
      )
  
file_path: AIX360/aix360/algorithms/rule_induction/trxf/scorecard/partition.py
imports: from typing import List, Dict, Any
  from aix360.algorithms.rule_induction.trxf.core import Feature
  from aix360.algorithms.rule_induction.trxf.scorecard import Bin
label_desc: Use image node_id 2 for calling the Partition obj's underlying member method code with example usage: obj.evaluate(assignment) and returns: curr_bin