Association rule mining interpretation I am trying to create a association using apriori algorithm.The data contains around 33000 records.Below is the sample of the data

id  code
1   19
1   58
1   111
2   19
2   111
2   167
3   12
3   79
3   85
4   96
5   19
6   58
7   12
7   18
7   40
7   48
7   85
7   86
7   135


In R this data is:

structure(list(id = c(1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 6, 7, 
7, 7, 7, 7, 7, 7), code = c(19, 58, 111, 19, 111, 167, 12, 79, 
85, 96, 19, 58, 12, 18, 40, 48, 85, 86, 135)), .Names = c("id", 
"code"), row.names = c(NA, -19L), class = "data.frame")


Using the following code I tried to build the association

# creating a string of codes based on the id
library(dplyr)
Asso2 = Asso %&gt;% 
  group_by(patient_id) %&gt;% 
  summarise(hi = toString(hcc_id))
# converting into transactions
library(arules)
fact &lt;- data.frame(lapply(Asso2,as.factor))
trans &lt;- as(fact, 'transactions') 
# Applying aprior
rules = apriori(trans, parameter = list(supp = 0.001, conf = 0.001,target = "rules"))
rules
inspect(rules)


I am getting totally 96 rules like below with empty lhs and I trying to understand whether we cannot make any rules from this data or am I missing anything here. Since I am novice in this, I would like to get some help.

#     lhs    rhs               support     confidence  lift
#  1  {}  =&gt; {hi=19, 96, 108}  0.001021696 0.001021696 1   
#  2  {}  =&gt; {hi=176}          0.001021696 0.001021696 1   
#  3  {}  =&gt; {hi=88, 108}      0.001021696 0.001021696 1   
#  4  {}  =&gt; {hi=72}           0.001051746 0.001051746 1   
#  5  {}  =&gt; {hi=88, 96}       0.001051746 0.001051746 1   
#  6  {}  =&gt; {hi=108, 112}     0.001081796 0.001081796 1   
#  7  {}  =&gt; {hi=84}           0.001081796 0.001081796 1   
#  8  {}  =&gt; {hi=100, 103}     0.001111846 0.001111846 1   
#  9  {}  =&gt; {hi=18, 108, 111} 0.001111846 0.001111846 1
Yes, this basically means that no sensible rules can be built with the constrains of support and confidence you impose. Note that your lift is always trivially one. The solution to this is given in the documentation of the package:

Note: The default value in APparameter for minlen is 1.
This means that rules with only one item (i.e., an empty
antecedent/LHS) like {} =&gt; {beer} will be created. These
rules mean that no matter what other items are involved
the item in the RHS will appear with the probability given
by the rule's confidence (which equals the support). If
you want to avoid these rules then use the argument
parameter=list(minlen=2).