title: Apriori Results in Python
body: <p>I am trying to run an apriori algorithm in python. My specific problem is when I use the apriori function, I specify the min_length as 2. However, when I print the rules, I get rules that contain only 1 item. I am wondering why apriori does not filter out items less than 2, because I specified I only want rules with 2 things in the itemset. </p>
  
  <pre class="lang-py prettyprint-override"><code>from apyori import apriori
  #store the transactions
  transactions = []
  total_transactions = 0
  with open('browsing.txt', 'r') as file:
      for transaction in file:
          total_transactions += 1
          items = []
          for item in transaction.split():
              items.append(item)
          transactions.append(items)
  #
  support_threshold = (100/total_transactions)
  print(support_threshold)
  
  minimum_support = 100
  frequent_items = apriori(transactions, min_length = 2, min_support = support_threshold)
  association_results = list(frequent_items)
  
  print(association_results[0])
  print(association_results[1])
  </code></pre>
  
  <p>My results: </p>
  
  <pre><code>RelationRecord(items=frozenset({'DAI11223'}), support=0.004983762579981351, ordered_statistics=[OrderedStatistic(items_base=frozenset(), items_add=frozenset({'DAI11223'}), confidence=0.004983762579981351, lift=1.0)])
  RelationRecord(items=frozenset({'DAI11778'}), support=0.0037619369152117293, ordered_statistics=[OrderedStatistic(items_base=frozenset(), items_add=frozenset({'DAI11778'}), confidence=0.0037619369152117293, lift=1.0)])
  </code></pre>