class_docstr: A method for determining frequent itemsets in a transactional database and
  also for generating rules for those itemsets. 
  
  Parameters:
  -----------
  min_sup: float
      The minimum fraction of transactions an itemets needs to
      occur in to be deemed frequent
  min_conf: float:
      The minimum fraction of times the antecedent needs to imply
      the concequent to justify rule
class_docstr_tok: ["A","method","for","determining","frequent","itemsets","in","a","transactional","database","and","also","for","generating","rules","for","those","itemsets",".","Parameters",":","--","--","--","--","--","-","min_sup",":","float","The","minimum","fraction","of","transactions","an","itemets","needs","to","occur","in","to","be","deemed","frequent","min_conf",":","float",":","The","minimum","fraction","of","times","the","antecedent","needs","to","imply","the","concequent","to","justify","rule"]
docstr: Returns the set of frequent itemsets in the list of transactions 
docstr_tok: ["Returns","the","set","of","frequent","itemsets","in","the","list","of","transactions"]
code: def find_frequent_itemsets(self, transactions):
      """Returns the set of frequent itemsets in the list of transactions"""
      self.transactions = transactions
      # Get all unique items in the transactions
      unique_items = set(
          item
          for transaction in self.transactions
          for item in transaction
      )
      # Get the frequent items
      self.freq_itemsets = [self._get_frequent_itemsets(unique_items)]
      while True:
          # Generate new candidates from last added frequent itemsets
          candidates = self._generate_candidates(self.freq_itemsets[-1])
          # Get the frequent itemsets among those candidates
          frequent_itemsets = self._get_frequent_itemsets(candidates)
  
          # If there are no frequent itemsets we're done
          if not frequent_itemsets:
              break
  
          # Add them to the total list of frequent itemsets and start over
          self.freq_itemsets.append(frequent_itemsets)
  
      # Flatten the array and return every frequent itemset
      frequent_itemsets = [
          itemset
          for sublist in self.freq_itemsets
          for itemset in sublist
      ]
      return frequent_itemsets
  
file_path: ML-From-Scratch/mlfromscratch/unsupervised_learning/apriori.py
imports: from __future__ import division, print_function
  import numpy
  import itertools
label_desc: Use image node_id 7 for calling the Apriori obj's underlying member method code with example usage: obj.find_frequent_itemsets(transactions) and returns: frequent_itemsets