Confidence is defined as the conditional probability of finding item B in a transaction given that item A is also present.
Confidence(A => B) = P(A ∪ B)/P(A)
Confidence signifies the strength of association between items.
Eg: Consider this table through which confidence will be illustrated.
Suppose a rule is set say Eggs => Bacon
In this case,
Confidence(Eggs => Bacon) = P(Bacons|Eggs) = P(Bacons ∪ Eggs)/ P(Eggs) = 0.4/0.6 = 0.667
In most of the real-world scenarios, people find confidence for the association rules generated and compare them with the threshold condition min_confidence which is set by the company or a person with deep domain knowledge.