APappearance-class {arules} | R Documentation |
Specifies the restrictions on the associations mined by
apriori
. Note that appearance is not supported by the
implementation of eclat
.
If appearance restrictions are used, an appearance object will be
created automatically within the apriori
function using
the information in the named list of the function's appearance
argument. In this case, the item labels used in the list will be
automatically matched against the items in the used transaction database.
The list can contain the following elements:
default
:"both"
, "lhs"
,
"rhs"
, "none"
(the default is "both"
). This
element specified the default appearance for all items not
explicitly mentioned in the other elements of the list.lhs
, rhs
, both
, none
,
items
:
Objects can also be created by calls of the form
new("APappearance", ...)
. In this case, item IDs (column
numbers of the transactions incidence matrix) have to be used instead
of labels.
set
:items
:labels
:default
:Christian Borgelt (2004) Apriori — Finding Association Rules/Hyperedges with the Apriori Algorithm. http://fuzzy.cs.uni-magdeburg.de/~borgelt/apriori.html
data("Adult") ## Mine only rules with small or large income in the right-hand-side. rules <- apriori(Adult, parameter = list(confidence = 0.5), appearance = list(rhs = c("income=small", "income=large"), default="lhs"))