associations-class | R Documentation |
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 signature 'associations'
quality(x)
## S4 replacement method for signature 'associations'
quality(x) <- value
## S4 method for signature 'associations'
info(x)
## S4 replacement method for signature 'associations'
info(x) <- value
## S4 method for signature 'associations'
head(x, n = 6L, by = NULL, decreasing = TRUE, ...)
## S4 method for signature 'associations'
tail(x, n = 6L, by = NULL, decreasing = TRUE, ...)
## S4 method for signature 'associations'
items(x)
## S4 method for signature 'associations'
length(x)
## S4 method for signature 'associations'
labels(object)
x , object |
the object. |
value |
the replacement value. |
n |
number of elements |
by |
sort by this interest measure |
decreasing |
sort in decreasing order? |
... |
further arguments. |
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.
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.
quality
a data.frame
info
a list
A virtual class: No objects may be created from it.
Michael Hahsler
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.