class_docstr: Information Gain split criterion.
  
  A measure of how often a randomly chosen element from the set would be
  incorrectly labeled if it was randomly labeled according to the
  distribution of labels in the subset.
  
  References
  ----------
  [Wikipedia entry](https://en.wikipedia.org/wiki/Decision_tree_learning#Information_gain)
class_docstr_tok: ["Information","Gain","split","criterion",".","A","measure","of","how","often","a","randomly","chosen","element","from","the","set","would","be","incorrectly","labeled","if","it","was","randomly","labeled","according","to","the","distribution","of","labels","in","the","subset",".","References","--","--","--","--","--","[","Wikipedia","entry","]","(","https",":","\/\/en.wikipedia.org\/wiki\/Decision_tree_learning","#","Information_gain",")"]
code: def num_subsets_greater_than_frac(distributions, min_frac):
      total_weight = 0.0
      dist_sums = [0.0] * len(distributions)
      for i in range(len(dist_sums)):
          dist_sums[i] = sum(distributions[i].values())
          total_weight += dist_sums[i]
      num_greater = 0
  
      if total_weight > 0:
          for d in dist_sums:
              if (d / total_weight) > min_frac:
                  num_greater += 1
      return num_greater
  
file_path: river/river/tree/split_criterion/info_gain_split_criterion.py
imports: from __future__ import annotations
  import math
  from .base import SplitCriterion
label_desc: Use image node_id 7 for calling the InfoGainSplitCriterion obj's underlying member method code with example usage: obj.num_subsets_greater_than_frac(distributions, min_frac) and returns: num_greater