Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. # Association Rule Graphs - graph all rules
  2. #
  3. # Change directory in png and start/stop values for `i`
  4. # to values appropriate for number of rules generated.
  5. #
  6. # Interest measures stored in `log`.
  7.  
  8. for (i in 1:100) {
  9.  
  10. log <- head(sort(a2rules, by = c("support", "confidence", "lift")), i)
  11.  
  12. png(filename = paste("~/GitHub/igraphs/",i,".png"),
  13. width = 1800, height = 1200, pointsize = 18, bg = "transparent")
  14.  
  15. par(family = "GillSans")
  16.  
  17. set.seed(144)
  18. plot(log, method = "graph",
  19. main = paste(i, "rules ~ support + confidence + lift (dh)"),
  20. edge.color = "#00000025",
  21. vertex.frame.color="#00000025",
  22. vertex.color = pdpal(100),
  23. vertex.label.color = "grey8",
  24. vertex.label.cex = 0.74, layout = layout_with_dh,
  25. vertex.label.dist = 0)
  26. dev.off()
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement