class_docstr: Leaf that always predicts the majority class.
  
  Parameters
  ----------
  stats
      Initial class observations.
  depth
      The depth of the node.
  splitter
      The numeric attribute observer algorithm used to monitor target statistics
      and perform split attempts.
  kwargs
      Other parameters passed to the learning node.
class_docstr_tok: ["Leaf","that","always","predicts","the","majority","class",".","Parameters","--","--","--","--","--","stats","Initial","class","observations",".","depth","The","depth","of","the","node",".","splitter","The","numeric","attribute","observer","algorithm","used","to","monitor","target","statistics","and","perform","split","attempts",".","kwargs","Other","parameters","passed","to","the","learning","node","."]
docstr: Calculate how likely a node is going to be split.
  
  A node with a (close to) pure class distribution will less likely be split.
  
  Returns
  -------
      A small value indicates that the node has seen more samples of a
      given class than the other classes.
docstr_tok: ["Calculate","how","likely","a","node","is","going","to","be","split",".","A","node","with","a","(","close","to",")","pure","class","distribution","will","less","likely","be","split",".","Returns","--","--","--","-","A","small","value","indicates","that","the","node","has","seen","more","samples","of","a","given","class","than","the","other","classes","."]
code: def calculate_promise(self):
      """Calculate how likely a node is going to be split.
  
      A node with a (close to) pure class distribution will less likely be split.
  
      Returns
      -------
          A small value indicates that the node has seen more samples of a
          given class than the other classes.
  
      """
      total_seen = sum(self.stats.values())
      if total_seen > 0:
          return total_seen - max(self.stats.values())
      else:
          return 0
  
imports: from __future__ import annotations
  from river.tree.utils import BranchFactory
  from river.utils.norm import normalize_values_in_dict
  from ..splitter.nominal_splitter_classif import NominalSplitterClassif
  from ..utils import do_naive_bayes_prediction, round_sig_fig
  from .leaf import HTLeaf
label_desc: Use image node_id 7 for calling the LeafMajorityClass obj's underlying member method code with example usage: obj.calculate_promise() and returns: unknown, int