View source: R/pat_rule_filter.R
| pat_rule_filter_dara | R Documentation |
Build a rule filter based on Divergent Association Ranking Analysis.
pat_rule_filter_dara(
data,
rhs_attr,
rhs_value = NULL,
attributes = NULL,
min_score = 1,
top = NULL,
score = c("sum", "mean", "max"),
use_abs = FALSE,
rule_weight = NULL
)
data |
Reference data frame used by DARA. |
rhs_attr |
Right-hand-side attribute used by the mined rules. |
rhs_value |
Optional right-hand-side value used to restrict |
attributes |
Optional attributes to compare. Defaults to common columns. |
min_score |
Minimum DARA score required to keep a rule. |
top |
Optional number of highest-scored rules to keep. |
score |
Rule score aggregation: |
use_abs |
If |
rule_weight |
Optional numeric rule column used to weight rule frequencies. |
DARA filters rules by scoring each antecedent with the divergence counters
computed by pat_dara(). A rule with antecedent values that are more prominent
in the rule set than in the exploratory data receives a higher positive score.
A pat_rule_filter_dara object.
Baroni, L., Salles, R., Salles, S., Guedes, G., Porto, F., Bezerra, E., Barcellos, C., Pedroso, M., & Ogasawara, E. (2020). An analysis of malaria in the Brazilian Legal Amazon using divergent association rules. Journal of Biomedical Informatics, 108, 103512.
The canonical implementation is maintained in the Python pydaltoolbox port; this is a
backport of it.
data <- data.frame(a = factor(c("x", "x", "y")), b = factor(c("z", "w", "z")))
filter <- pat_rule_filter_dara(data, rhs_attr = "b", rhs_value = "z")
class(filter)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.