-2

I clustered the association rules with arules package's PAM function in R and this package provides Silhouette Plot of association rules but it just shows the number of rules belong that cluster which is shown below .png file but I want to see those rules one by one. For example second cluster has 7 rules and I want to see those rules. Is it possible? Here is the some code that I ran in R:

library(rio)

library("arules", lib.loc="~/R/win-library/3.4")

library("cluster", lib.loc="~/R/win-library/3.4")

data <- import("C:\Users\GokhanGoy\Desktop\Apriori.xlsx")

data2 <- data.frame(sapply(data,as.factor))

install.packages("arulesViz")

library("arulesViz", lib.loc="~/R/win-library/3.4")

rules3 <- apriori(data2, parameter=list(support=0.5, confidence=0.9))

d <- dissimilarity(rules3,method = "Jaccard")

clustering <- pam(d,k=3)

plot(clustering)

Here is the ".png" file:

Community
  • 1
  • 1
  • welcome to SO. Please see [How to Ask](https://stackoverflow.com/help/how-to-ask) and this elegant post that describes in detail how to produce a [minimum working reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) So far its difficult to understand what have you tried? Where is the .png file suggested in the question?. – mnm Jul 06 '18 at 10:35

1 Answers1

0

Use the other attributes of the clustering object.

Plotting is not supposed to list the labels, but only the Silhouette.

But based on the Silhouette, the clusters are bad. So why further investigate?

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194