The associations class is a virtual class which is extended to
represent mining result (e.g., sets of itemsets or
rules). The class defines some common methods for its subclasses.
# S4 method for associations
quality(x)# S4 method for associations
quality(x) <- value
# S4 method for associations
info(x)
# S4 method for associations
info(x) <- value
# S4 method for associations
head(x, n = 6L, by = NULL, decreasing = TRUE, ...)
# S4 method for associations
tail(x, n = 6L, by = NULL, decreasing = TRUE, ...)
# S4 method for associations
items(x)
# S4 method for associations
length(x)
# S4 method for associations
labels(object)
the object.
the replacement value.
number of elements
sort by this interest measure
sort in decreasing order?
further arguments.
quality(associations): returns the quality data.frame.
quality(associations) <- value: replaces the quality data.frame. The lengths of the vectors in the data.frame have to equal the number of associations in the set.
info(associations): returns the info list.
info(associations) <- value: replaces the info list.
head(associations): returns the first n associations.
tail(associations): returns the last n associations.
items(associations): dummy method. This method has to be implemented by all subclasses of associations and return the items which make up each association as an object of class itemMatrix.
length(associations): dummy method. This method has to be implemented by all subclasses of associations and return the number of elements in the association.
labels(associations): dummy method. This method has to be implemented by all subclasses of associations and return a vector of length(object) of labels for the elements in the association.
qualitya data.frame
infoa list
A virtual class: No objects may be created from it.
Michael Hahsler
The implementations of associations store itemsets (e.g., the LHS and
RHS of a rule) as objects of class itemMatrix (i.e., sparse
binary matrices). Quality measures (e.g., support) are stored in a
data.frame accessible via method quality().
See Sections Functions and See Also to see all available methods.
Note: Associations can store multisets with duplicated elements. Duplicated
elements can result from combining several sets of associations. Use
unique() to remove duplicate associations.
Subclasses: rules, itemsets
Other associations functions:
abbreviate(),
c(),
duplicated(),
extract,
inspect(),
is.closed(),
is.generator(),
is.maximal(),
is.redundant(),
is.significant(),
is.superset(),
itemsets-class,
match(),
rules-class,
sample(),
sets,
size(),
sort(),
unique()