View source: R/Rule_building.R
add_negative_terms | R Documentation |
Increases rule specificity by adding negative terms iteratively, selecting
only terms that remove non-relevant records without impacting the number of
positive matches. Usually not used by itself, but inside
generate_rule_selection_set()
.
add_negative_terms(rules, target_vec, target_data)
rules |
A vector of rules as produced by |
target_vec |
A vector of labels. |
target_data |
A DTM with a number of rows as the elements in
|
A data frame with a column with the negative terms for each
rule, the number of positive and negative matches identified by the
negative terms in the target_data
and the ID of these records..
pos/neg' = glue('tot_pos/tot_neg'),
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.