docstr: Compute the score of the node.
  
  Parameters
  ----------
  y
      Class for which we want the score.
  dirichlet
      Dirichlet parameter of the tree.
  n_classes
      The total number of classes seen so far.
  
  Notes
  -----
  This uses Jeffreys prior with Dirichlet parameter for smoothing.
docstr_tok: ["Compute","the","score","of","the","node",".","Parameters","--","--","--","--","--","y","Class","for","which","we","want","the","score",".","dirichlet","Dirichlet","parameter","of","the","tree",".","n_classes","The","total","number","of","classes","seen","so","far",".","Notes","--","--","-","This","uses","Jeffreys","prior","with","Dirichlet","parameter","for","smoothing","."]
code: def score(
      self, y: base.typing.ClfTarget, dirichlet: float, n_classes: int
  ) -> float:
      """Compute the score of the node.
  
      Parameters
      ----------
      y
          Class for which we want the score.
      dirichlet
          Dirichlet parameter of the tree.
      n_classes
          The total number of classes seen so far.
  
      Notes
      -----
      This uses Jeffreys prior with Dirichlet parameter for smoothing.
  
      """
  
      count = self.counts[y]
  
      # We use the Jeffreys prior with dirichlet parameter
      return (count + dirichlet) / (
          self.n_samples + dirichlet * n_classes
      )
  
imports: from __future__ import annotations
  import collections
  import math
  from river import base, stats
  from river.tree.base import Branch, Leaf
  from river.utils.math import log_sum_2_exp
label_desc: Use image node_id 3 for calling the MondrianNodeClassifier obj's underlying member method code with example usage: obj.score(y, dirichlet, n_classes) and returns: unknown