The Wayback Machine - https://web.archive.org/web/20241028192557/https://www.geeksforgeeks.org/association-rule/
Open In App

Association Rule

Last Updated : 11 Jan, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow
Association rule mining finds interesting associations and relationships among large sets of data items. This rule shows how frequently a itemset occurs in a transaction. A typical example is a Market Based Analysis. Market Based Analysis is one of the key techniques used by large relations to show associations between items.It allows retailers to identify relationships between the items that people buy together frequently. Given a set of transactions, we can find rules that will predict the occurrence of an item based on the occurrences of other items in the transaction.
TID Items
1 Bread, Milk
2 Bread, Diaper, Beer, Eggs
3 Milk, Diaper, Beer, Coke
4 Bread, Milk, Diaper, Beer
5 Bread, Milk, Diaper, Coke
Before we start defining the rule, let us first see the basic definitions. Support Count(\sigma) – Frequency of occurrence of a itemset.
Here \sigma({Milk, Bread, Diaper})=2 
Frequent Itemset – An itemset whose support is greater than or equal to minsup threshold. Association Rule – An implication expression of the form X -> Y, where X and Y are any 2 itemsets.
Example: {Milk, Diaper}->{Beer} 
Rule Evaluation Metrics –
  • Support(s) – The number of transactions that include items in the {X} and {Y} parts of the rule as a percentage of the total number of transaction.It is a measure of how frequently the collection of items occur together as a percentage of all transactions.
  • Support = \sigma(X+Y) \div total – It is interpreted as fraction of transactions that contain both X and Y.
  • Confidence(c) – It is the ratio of the no of transactions that includes all items in {B} as well as the no of transactions that includes all items in {A} to the no of transactions that includes all items in {A}.
  • Conf(X=>Y) = Supp(X\cupY) \div Supp(X) – It measures how often each item in Y appears in transactions that contains items in X also.
  • Lift(l) – The lift of the rule X=>Y is the confidence of the rule divided by the expected confidence, assuming that the itemsets X and Y are independent of each other.The expected confidence is the confidence divided by the frequency of {Y}.
  • Lift(X=>Y) = Conf(X=>Y) \div Supp(Y) – Lift value near 1 indicates X and Y almost often appear together as expected, greater than 1 means they appear together more than expected and less than 1 means they appear less than expected.Greater lift values indicate stronger association.
Example – From the above table, {Milk, Diaper}=>{Beer}
s= \sigma({Milk, Diaper, Beer}) \div |T|
= 2/5
= 0.4

c= \sigma(Milk, Diaper, Beer) \div \sigma(Milk, Diaper)
= 2/3
= 0.67

l= Supp({Milk, Diaper, Beer}) \div Supp({Milk, Diaper})*Supp({Beer})
= 0.4/(0.6*0.6)
= 1.11 
The Association rule is very useful in analyzing datasets. The data is collected using bar-code scanners in supermarkets. Such databases consists of a large number of transaction records which list all items bought by a customer on a single purchase. So the manager could know if certain groups of items are consistently purchased together and use this data for adjusting store layouts, cross-selling, promotions based on statistics.


Similar Reads

Frequent Item set in Data set (Association Rule Mining)
INTRODUCTION:Frequent item sets, also known as association rules, are a fundamental concept in association rule mining, which is a technique used in data mining to discover relationships between items in a dataset. The goal of association rule mining is to identify relationships between items in a dataset that occur frequently together.A frequent i
6 min read
Association Rule Mining in R Programming
Association Rule Mining in R Language is an Unsupervised Non-linear algorithm to uncover how the items are associated with each other. In it, frequent Mining shows which items appear together in a transaction or relation. It's majorly used by retailers, grocery stores, an online marketplace that has a large transactional database. The same way when
3 min read
Data Mining Multidimensional Association Rule
In this article, we are going to discuss Multidimensional Association Rule. Also, we will discuss examples of each. Let's discuss one by one. Multidimensional Association Rules : In Multi dimensional association rule Qualities can be absolute or quantitative. Quantitative characteristics are numeric and consolidates order. Numeric traits should be
2 min read
Multilevel Association Rule in data mining
Multilevel Association Rule : Association rules created from mining information at different degrees of reflection are called various level or staggered association rules. Multilevel association rules can be mined effectively utilizing idea progressions under a help certainty system. Rules at a high idea level may add to good judgment while rules a
4 min read
GeeksforGeeks - HackTeam, NSIT Delhi Association - 2018
The main objective of this hackathon is to sensitize students and professionals about existing problems of the under privileged and lesser developed sections of our society and providing a platform whereby they can proactively develop and showcase technological solutions for these challenges. The Hackathon will be held in phases after completion of
1 min read
GeeksforGeeks - TedX MSIT Association - Jan 2018
TED is a nonprofit organization devoted to spreading ideas, usually in the form of short, powerful talks. TED began in 1984 as a conference where Technology, Entertainment and Design converged, and today covers almost all topics — from science to business to global issues — in more than 100 languages. TED's mission of "Ideas Worth Spreading" reache
2 min read
“GeeksforGeeks and ACM VIT Association – March 2018”
Code2Create is a 36-hour hackathon that welcomes innovators from all across India. The six tracks of this hackathon deal with major contemporary topics and include FinTech, Education, Healthcare, Smart Cities, AR/VR and Space . Cash prizes worth 50k to be won and loads of freebies including stickers, pens, t-shirts and more to be given away! To kee
2 min read
GeeksforGeeks - JIIT 128 Association for Mega Events - Feb 2018
We would like to thank our sponsor GeeksforGeeks - A Computer Science Portal for giving us opportunity to successfully organise various events for past few years on our Annual Technical Cultural 2 day long Fest “Converge”. Gfg has always appreciated and encouraged creative minds and talents of students along with acknowledging their performance by
2 min read
Rule-Based Classifier - Machine Learning
Rule-based classifiers are just another type of classifier which makes the class decision depending by using various "if..else" rules. These rules are easily interpretable and thus these classifiers are generally used to generate descriptive models. The condition used with "if" is called the antecedent and the predicted class of each rule is called
4 min read
Learn-One-Rule Algorithm
Prerequisite: Rule-Based Classifier Learn-One-Rule: This method is used in the sequential learning algorithm for learning the rules. It returns a single rule that covers at least some examples (as shown in Fig 1). However, what makes it really powerful is its ability to create relations among the attributes given, hence covering a larger hypothesis
3 min read
Hebbian Learning Rule with Implementation of AND Gate
Hebbian Learning Rule, also known as Hebb Learning Rule, was proposed by Donald O Hebb. It is one of the first and also easiest learning rules in the neural network. It is used for pattern classification. It is a single layer neural network, i.e. it has one input layer and one output layer. The input layer can have many units, say n. The output lay
3 min read
Rule-Based Tokenization in NLP
Natural Language Processing (NLP) is a subfield of artificial intelligence that aims to enable computers to process, understand, and generate human language. One of the critical tasks in NLP is tokenization, which is the process of splitting text into smaller meaningful units, known as tokens. Dictionary-based tokenization is a common method used i
4 min read
Rule Based Approach in NLP
Natural Language Processing serves as an interrelationship between human language and computers. It is a subfield of Artificial Intelligence that helps machines process, understand and generate natural language intuitively. Common tasks done by NLP are text and speech processing, language translation, sentiment analysis, etc. The use cases include
7 min read
Rule Based System Vs Machine Learning System
There are two main approaches in Artificial intelligence they are rule-based systems and machine-learning systems. Rule-based systems follow explicit rules created by human experts. They're like a set of instructions given to a computer that follows to make decisions. These systems are good for problems with clear rules and paths. On the other hand
8 min read
Rule Engine vs Machine Learning?
Answer: Rule engines use predefined logic to make decisions, while machine learning algorithms learn from data to make predictions or decisions.Rule engines and machine learning represent two fundamentally different approaches to decision-making and prediction in computer systems. While rule engines operate on explicit, pre-defined rules set by hum
2 min read
Chain Rule Derivative in Machine Learning
In machine learning, understanding the chain rule and its application in computing derivatives is essential. The chain rule allows us to find the derivative of composite functions, which frequently arise in machine learning models due to their layered architecture. These models often involve multiple nested functions, and the chain rule helps us co
5 min read
Machine Learning Tutorial
Machine Learning tutorial covers basic and advanced concepts, specially designed to cater to both students and experienced working professionals. This machine learning tutorial helps you gain a solid introduction to the fundamentals of machine learning and explore a wide range of techniques, including supervised, unsupervised, and reinforcement lea
9 min read
Backpropagation in Neural Network
Machine learning models learn from data and make predictions. One of the fundamental concepts behind training these models is backpropagation. In this article, we will explore what backpropagation is, why it is crucial in machine learning, and how it works. Table of Content What is backpropagation?Advantages of Using the Backpropagation Algorithm i
12 min read
100+ Machine Learning Projects with Source Code [2024]
Machine Learning gained a lot of popularity and become a necessary tool for research purposes as well as for Business. It is a revolutionary field that helps us to make better decisions and automate tasks. Machine Learning is the field of study that gives computers the capability to learn without being explicitly programmed. In this article, you'll
7 min read
Support Vector Machine (SVM) Algorithm
A Support Vector Machine (SVM) is a powerful machine learning algorithm widely used for both linear and nonlinear classification, as well as regression and outlier detection tasks. SVMs are highly adaptable, making them suitable for various applications such as text classification, image classification, spam detection, handwriting identification, g
12 min read
One Hot Encoding in Machine Learning
Most real-life datasets we encounter during our data science project development have columns of mixed data type. These datasets consist of both categorical as well as numerical columns. However, various Machine Learning models do not work with categorical data and to fit this data into the machine learning model it needs to be converted into numer
5 min read
Introduction to Recurrent Neural Network
In this article, we will introduce a new variation of neural network which is the Recurrent Neural Network also known as (RNN) that works better than a simple neural network when data is sequential like Time-Series data and text data. What is Recurrent Neural Network (RNN)?Recurrent Neural Network(RNN) is a type of Neural Network where the output f
15+ min read
Linear Regression in Machine learning
Machine Learning is a branch of Artificial intelligence that focuses on the development of algorithms and statistical models that can learn from and make predictions on data. Linear regression is also a type of machine-learning algorithm more specifically a supervised machine-learning algorithm that learns from the labelled datasets and maps the da
15+ min read
Data encryption standard (DES) | Set 1
This article talks about the Data Encryption Standard (DES), a historic encryption algorithm known for its 56-bit key length. We explore its operation, key transformation, and encryption process, shedding light on its role in data security and its vulnerabilities in today's context. What is DES?Data Encryption Standard (DES) is a block cipher with
15+ min read
Decision Tree
Decision trees are a popular and powerful tool used in various fields such as machine learning, data mining, and statistics. They provide a clear and intuitive way to make decisions based on data by modeling the relationships between different variables. This article is all about what decision trees are, how they work, their advantages and disadvan
5 min read
Introduction to Convolution Neural Network
A Convolutional Neural Network (CNN) is a type of Deep Learning neural network architecture commonly used in Computer Vision. Computer vision is a field of Artificial Intelligence that enables a computer to understand and interpret the image or visual data. When it comes to Machine Learning, Artificial Neural Networks perform really well. Neural Ne
10 min read
Logistic Regression in Machine Learning
Logistic regression is a supervised machine learning algorithm used for classification tasks where the goal is to predict the probability that an instance belongs to a given class or not. Logistic regression is a statistical algorithm which analyze the relationship between two data factors. The article explores the fundamentals of logistic regressi
13 min read
K means Clustering - Introduction
K-Means Clustering is an Unsupervised Machine Learning algorithm, which groups the unlabeled dataset into different clusters. The article aims to explore the fundamentals and working of k mean clustering along with the implementation. Table of Content What is K-means Clustering?What is the objective of k-means clustering?How k-means clustering work
9 min read
K-Nearest Neighbor(KNN) Algorithm
The K-Nearest Neighbors (KNN) algorithm is a supervised machine learning method employed to tackle classification and regression problems. Evelyn Fix and Joseph Hodges developed this algorithm in 1951, which was subsequently expanded by Thomas Cover. The article explores the fundamentals, workings, and implementation of the KNN algorithm. What is t
15+ min read
Naive Bayes Classifiers
A Naive Bayes classifiers, a family of algorithms based on Bayes' Theorem. Despite the "naive" assumption of feature independence, these classifiers are widely utilized for their simplicity and efficiency in machine learning. The article delves into theory, implementation, and applications, shedding light on their practical utility despite oversimp
12 min read
Practice Tags :
three90RightbarBannerImg