Expert answer:ITS836 Cumberlands Data Science and Big Data Analy


Solved by verified expert:Need to work on R Studio for this Assignment. This assignment need to take screen shot and make PPT. Thanks

Unformatted Attachment Preview

Don't use plagiarized sources. Get Your Custom Essay on
Expert answer:ITS836 Cumberlands Data Science and Big Data Analy
Just from $10/Page
Order Essay

School of Computer &
Information Sciences
ITS 836 Data Science and Big Data Analytics
ITS 836
Lecture 05 – HW05 Association Rules
• HW05 Exercise 1 – review apriori algorithm and create slides:
• HW05 Exercise 2: Grocery Dataset with R
• HW05 Exercise 3: Apply priori Rules to “marketbasket.csv”
• HW05 Exercise 4: “R for Data Science” Module 4
ITS 836
Exercise 1
• Summarize the aPriori algorithm
How the apriori algorithm works?
ITS 836
Exercise 2: Grocery Store Transactions from
Packages -> Install -> arules, arulesViz
# don’t enter next line
install.packages(c(“arules”, “arulesViz”)) # appears on console
# indicates 9835 rows
Class of dataset Groceries is transactions, containing 3 slots
# data frame with vectors having length of
# data frame storing item labels
# binary evidence matrix of labels in transactions
paste(Groceries@itemInfo[r,”labels”],collapse=”, “))
Exercise 2 Grocery Store Transactions
Section – 5.5.2 Frequent Itemset Generation
To illustrate the Apriori algorithm, the code below does each iteration separately.
Assume minimum support threshold = 0.02 (0.02 * 9853 = 198 items), get 122 itemsets total
First, get itemsets of length 1
itemsets<-apriori(Groceries,parameter=list(minlen=1,maxlen=1,support=0.02,target="frequent itemsets")) summary(itemsets) # found 59 itemsets inspect(head(sort(itemsets,by="support"),10)) # lists top 10 Second, get itemsets of length 2 itemsets<-apriori(Groceries,parameter=list(minlen=2,maxlen=2,support=0.02,target="frequent itemsets")) summary(itemsets) # found 61 itemsets inspect(head(sort(itemsets,by="support"),10)) # lists top 10 Third, get itemsets of length 3 > itemsets<-apriori(Groceries,parameter=list(minlen=3,maxlen=3,support=0.02,target="frequent itemsets")) > summary(itemsets)
# found 2 itemsets
> inspect(head(sort(itemsets,by=”support”),10))
# lists top 10
> summary(itemsets)
# found 59 itemsets> inspect(head(sort(itemsets,by=”support”),10))
# lists top 10 supported items
Exercise 2 Grocery Store Transactions
5.5.3 Rule Generation and Visualization
The Apriori algorithm will now generate rules.
Set minimum support threshold to 0.001 (allows more rules, presumably for the
scatterplot) and minimum confidence threshold to 0.6 to generate 2,918 rules.
> rules summary(rules)
# finds 2918 rules
> plot(rules)
# displays scatterplot
The scatterplot shows that the highest lift occurs at a low support and a low
Exercise 2 Grocery Store Transactions
5.5.3 Rule Generation and Visualization
Exercise 2 Grocery Store Transactions
5.5.3 Rule Generation and Visualization
Get scatterplot matrix to compare the
support, confidence, and lift of the 2918
# displays scatterplot matrix
Lift is proportional to confidence with
several linear groupings.
Note that Lift = Confidence/Support(Y), so
when support of Y remains the same, lift is
proportional to confidence and the slope
of the linear trend is the reciprocal of
Exercise 2 Grocery Store Transactions
5.5.3 Rule Generation and Visualization
Compute the 1/Support(Y) which is the
> slope unlist(lapply(split(slope,f=slope),length))
Display the top 10 rules sorted by lift
> inspect(head(sort(rules,by=”lift”),10))
Rule {Instant food products, soda} ->
{hamburger meat}
has the highest lift of 19 (page 154)
Exercise 2 Grocery Store Transactions
5.5.3 Rule Generation and Visualization
Visualize the top 5 rules with the highest lift.
> highLiftRules<-head(sort(rules,by="lift"),5) >
In the graph, the arrow always points from an
item on the LHS to an item on the RHS.
For example, the arrows that connects
ham, processed cheese, and white
bread suggest the rule
{ham, processed cheese} -> {white
Size of circle indicates support and shade
represents lift
Exercise 3 – Apply priori Rules to “marketbasket.csv”
• Use the data
– apply Exercise 2 method to the data
• You can also use the following references
ITS 836
Exercise 4: Model & Graphics
28 Graphics
23 Model Basics
24 Model Building
25 Many Models
ITS 836
ITS 836
”R for Data Science” 5 Modules
I Explore
II Wrangle
III Program
IV Model
R for Data Science, Garrett Grolemund & Hadley Wickham
ITS 836
V Communicate

Purchase answer to see full

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 30% with the discount code ESSAYSHELP