is_infeasible {validatetools} | R Documentation |
Check the feasibility of a rule set
Description
An infeasible rule set cannot be satisfied by any data because of internal
contradictions: the combination of the rules make it inconsistent.
This function checks whether the record-wise linear,
categorical and conditional rules in a rule set are consistent.
Note that is it wise to also check detect_contradicting_if_rules()
:
conditional If-rules
may not be strictly inconsistent, but can be semantically inconsistent.
Usage
is_infeasible(x, ..., verbose = interactive())
Arguments
x |
|
... |
not used |
verbose |
if |
Value
TRUE or FALSE
See Also
Other feasibility:
detect_boundary_cat()
,
detect_boundary_num()
,
detect_contradicting_if_rules()
,
detect_infeasible_rules()
,
is_contradicted_by()
,
make_feasible()
Examples
rules <- validator( x > 0)
is_infeasible(rules)
# infeasible system!
rules <- validator( rule1 = x > 0
, rule2 = x < 0
)
is_infeasible(rules)
detect_infeasible_rules(rules, verbose=TRUE)
# but we want to keep rule1, so specify that it has an Inf weight
detect_infeasible_rules(rules, weight=c(rule1=Inf), verbose=TRUE)
# detect and remove
make_feasible(rules, weight=c(rule1=Inf), verbose = TRUE)
# find out the conflict with rule2
is_contradicted_by(rules, "rule2", verbose = TRUE)
[Package validatetools version 0.6.1 Index]