Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.86 KB | None | 0 0
  1. ### co kupują klienci, którzy kupili masło
  2. maslo.and <- apriori(data = groceries,
  3.                      parameter = list(supp = 0.001, conf = 0.08, minlen = 2),
  4.                      appearance = list(default = "rhs", lhs = "butter"),
  5.                      control = list(verbose = F))
  6. maslo.and <- sort(maslo.and, decreasing = TRUE, by = "confidence")
  7.  
  8. write(x = maslo.and, file = "maslo_z_czym.csv", quote = TRUE, sep = ",")
  9.  
  10.  
  11. ### które towary kupują klienci wraz z masłem
  12. and.maslo <- apriori(data = groceries,
  13.                      parameter = list(supp = 0.001, conf = 0.08, minlen = 2),
  14.                      appearance = list(default = "lhs", rhs = "butter"),
  15.                      control = list(verbose = F))
  16. and.maslo <- sort(and.maslo, decreasing = TRUE, by = "confidence")
  17.  
  18. write(x = and.maslo, file = "co_wraz_z_maslem.csv", quote = TRUE, sep = ",")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement