View source: R/dig_tautologies.R
| dig_tautologies | R Documentation |
This function finds tautologies in a dataset, i.e., rules of the form
{a1 & a2 & ... & an} => {c} where a1, a2, ..., an are
antecedents and c is a consequent. The intent of searching for
tautologies is to find rules that are always true, which may be
used for filtering of further generated conditions. The resulting
rules may be used as a basis for the list of excluded formulae
(see the excluded argument of dig()).
dig_tautologies(
x,
antecedent = everything(),
consequent = everything(),
disjoint = var_names(colnames(x)),
max_length = Inf,
min_coverage = 0,
min_support = 0,
min_confidence = 0,
contingency_table = FALSE,
measures = deprecated(),
t_norm = "goguen",
max_results = Inf,
verbose = FALSE,
threads = 1
)
x |
a matrix or data frame with data to search in. The matrix must be
numeric (double) or logical. If |
antecedent |
a tidyselect expression (see tidyselect syntax) specifying the columns to use in the antecedent (left) part of the rules |
consequent |
a tidyselect expression (see tidyselect syntax) specifying the columns to use in the consequent (right) part of the rules |
disjoint |
an atomic vector of size equal to the number of columns of |
max_length |
The maximum length, i.e., the maximum number of predicates in the antecedent, of a rule to be generated. If equal to Inf, the maximum length is limited only by the number of available predicates. |
min_coverage |
the minimum coverage of a rule in the dataset |
min_support |
the minimum support of a rule in the dataset |
min_confidence |
the minimum confidence of a rule in the dataset |
contingency_table |
a logical value indicating whether to provide a contingency
table for each rule. If |
measures |
(Deprecated. Search for tautologies using
|
t_norm |
a t-norm used to compute conjunction of weights. It must be one of
|
max_results |
the maximum number of generated conditions to execute the
callback function on. If the number of found conditions exceeds
|
verbose |
a logical value indicating whether to print progress messages. |
threads |
the number of threads to use for parallel computation. |
The search for tautologies is performed by iteratively
searching for rules with increasing length of the antecedent.
Rules found in previous iterations are used as excluded
argument in the next iteration.
An S3 object which is an instance of associations and nugget
classes and which is a tibble with found tautologies in the format equal to
the output of dig_associations().
Michal Burda
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.