arulesViz "graph" plot doesn't show the connections

I'm using the arulesViz library to plot some graphs about recommendation systems.
I have some rules and I want to plot them in a graph plot.

plot(regras, method = "graph", control = list(type = "itens"))

This is what I got:

Upvotes: 3

Views: 680

Answers (1)

G5W
G5W

Reputation: 37661

This appears to be a bug in arulesViz. However, there is a workaround.

Since you do not provide any data that can be used as an example, I will use a variation of the example from the documentation. Just using the basic plot shows no links like in your question.

data(Groceries)
rules <- apriori(Groceries, parameter=list(support=0.002, confidence=0.8))
plot(rules, method="graph")

Graph with no links

However, if you set alpha=1 the links will display.

plot(rules, method="graph",  alpha = 1)

Graph with links

Upvotes: 4

Related Questions