class_docstr: Numeric attribute observer for classification tasks that discretizes features
  using histograms.
  
  
  Parameters
  ----------
  n_bins
      The maximum number of bins in the histogram.
  n_splits
      The number of split points to evaluate when querying for the best split
      candidate.
class_docstr_tok: ["Numeric","attribute","observer","for","classification","tasks","that","discretizes","features","using","histograms",".","Parameters","--","--","--","--","--","n_bins","The","maximum","number","of","bins","in","the","histogram",".","n_splits","The","number","of","split","points","to","evaluate","when","querying","for","the","best","split","candidate","."]
code: def cond_proba(self, att_val, target_val):
      if target_val not in self.hists:
          return 0.0
  
      total_weight = self.hists[target_val].n
      if not total_weight > 0:
          return 0.0
  
      i = bisect.bisect(
          self.hists[target_val], Bin(att_val, att_val, 1)
      )
  
      if i < len(self.hists[target_val]):
          b = self.hists[target_val][i]
      else:  # att_val exceeds the range: take the last bin
          b = self.hists[target_val][-1]
  
      # Approximates the PDF of x by using the frequency in its corresponding
      # histogram bin
      if b.left == b.right:
          return b.count / total_weight
      else:
          return (
              b.count * (att_val - b.left) / (b.right - b.left)
          ) / total_weight
  
file_path: river/river/tree/splitter/histogram_splitter.py
imports: from __future__ import annotations
  import bisect
  import collections
  import functools
  from river import sketch
  from river.sketch.histogram import Bin
  from ..utils import BranchFactory
  from .base import Splitter
label_desc: Use image node_id 3 for calling the HistogramSplitter obj's underlying member method code with example usage: obj.cond_proba(att_val, target_val) and returns: int, int, unknown, unknown