class_docstr: Defines a Bin specified by a half-open interval [left_end, right_end) where the sub-score is calculated using
  a linear function of the feature value (requires the feature to evaluate to a numerical value).
docstr: @param feature: An instance of trxf.core.Feature associated with this bin. This must be a numerical feature.
  @param const_part: The constant additive part used in calculating the sub-score.
  @param linear_multiplier: The sub-score will be calculated as linear_multiplier * feature_value + const_part
  @param left_end: The left endpoint of the interval. Set to -infinity if not specified.
  @param right_end: The right endpoint of the interval. Set to +infinity if not specified.
docstr_tok: ["@","param","feature",":","An","instance","of","trxf.core.Feature","associated","with","this","bin",".","This","must","be","a","numerical","feature",".","@","param","const_part",":","The","constant","additive","part","used","in","calculating","the","sub-score",".","@","param","linear_multiplier",":","The","sub-score","will","be","calculated","as","linear_multiplier","*","feature_value","+","const_part","@","param","left_end",":","The","left","endpoint","of","the","interval",".","Set","to","-infinity","if","not","specified",".","@","param","right_end",":","The","right","endpoint","of","the","interval",".","Set","to","+infinity","if","not","specified","."]
code: def __init__(
      self,
      feature: Feature,
      const_part: Real,
      linear_multiplier: Real,
      left_end: Optional[Real] = None,
      right_end: Optional[Real] = None,
  ):
      """
      @param feature: An instance of trxf.core.Feature associated with this bin. This must be a numerical feature.
      @param const_part: The constant additive part used in calculating the sub-score.
      @param linear_multiplier: The sub-score will be calculated as linear_multiplier * feature_value + const_part
      @param left_end: The left endpoint of the interval. Set to -infinity if not specified.
      @param right_end: The right endpoint of the interval. Set to +infinity if not specified.
      """
      if left_end is None:
          left_end = float("-inf")
      if right_end is None:
          right_end = float("inf")
  
      if left_end >= right_end:
          raise ValueError(
              'Need left_end < right_end but left_end = "{}" and right_end = "{}"'.format(
                  left_end, right_end
              )
          )
  
      super(LinearIntervalBin, self).__init__(feature)
      self._left_end = left_end
      self._right_end = right_end
      self._linear_multiplier = linear_multiplier
      self._const_part = const_part
  
imports: import abc
  from numbers import Real
  from typing import Dict, Set, Any, Optional
  from aix360.algorithms.rule_induction.trxf.core import Feature
label_desc: Use image node_id 1 to create a new LinearIntervalBin object from inherited base classes: Bin with example: obj = LinearIntervalBin(feature, const_part, linear_multiplier, left_end, right_end)