class_docstr: A method for determining frequent itemsets in a transactional database. 
  This is done by building a so called FP Growth tree, which can then be mined
  to collect the frequent itemsets. More effective than Apriori for large transactional
  databases.
  
  Parameters:
  -----------
  min_sup: float
      The minimum fraction of transactions an itemets needs to
      occur in to be deemed frequent
class_docstr_tok: ["A","method","for","determining","frequent","itemsets","in","a","transactional","database",".","This","is","done","by","building","a","so","called","FP","Growth","tree",",","which","can","then","be","mined","to","collect","the","frequent","itemsets",".","More","effective","than","Apriori","for","large","transactional","databases",".","Parameters",":","--","--","--","--","--","-","min_sup",":","float","The","minimum","fraction","of","transactions","an","itemets","needs","to","occur","in","to","be","deemed","frequent"]
docstr: Recursive method which adds nodes to the tree. 
docstr_tok: ["Recursive","method","which","adds","nodes","to","the","tree","."]
code: def _insert_tree(self, node, children):
      """Recursive method which adds nodes to the tree."""
      if not children:
          return
      # Create new node as the first item in children list
      child_item = children[0]
      child = FPTreeNode(item=child_item)
      # If parent already contains item => increase the support
      if child_item in node.children:
          node.children[child.item].support += 1
      else:
          node.children[child.item] = child
  
      # Execute _insert_tree on the rest of the children list
      # from the new node
      self._insert_tree(node.children[child.item], children[1:])
  
file_path: ML-From-Scratch/mlfromscratch/unsupervised_learning/fp_growth.py
imports: from __future__ import division, print_function
  import numpy
  import itertools
label_desc: Use image node_id 4 for calling the FPGrowth obj's underlying member method code with example usage: obj._insert_tree(node, children) without return types