You are on page 1of 2

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment1.3
Student Name: CHIRAG BITHER UID: 20BCS1838
Branch: BE-CSE Section/Group: 905/A
Semester: 6th Date of Performance: 01/03/2023
Subject Name: Data Mining Lab Subject Code: 20CSP-376

1. Aim:
Demonstration of association rule using Apriori Algorithm.

2. Objective:
 Elaboration of apriori algorithm such as support & various others.
 Association rule mining finds interesting associations & relationships among large sets
of data items.
 This rule shows how frequently an itemset occurs in a transaction.
 In this experiment I have learned to create plot and how to use different package library.

3. Code and Output:

 PROGRAM

#Apriori Algorithm
library(arules)
library(arulesViz)
library(RColorBrewer)

#import dataset
data("Groceries")

#using apriori() function


rules <- apriori(Groceries,
parameter = list(supp = 0.01, conf = 0.2))
#using itemFrequencyPlot() function
arules::itemFrequencyPlot(Groceries , topN =20,
col = brewer.pal(8, 'Pastel2'),
main = 'Relative Item Frequency Plot',
type = "relative",
ylab = "Item Frequency(Relative)")
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

 OUTPUT

You might also like