selective_explanation {DEXiR} | R Documentation |
Selective Explanation: Displays subtrees of alternatives' values in which values are particularly weak (value quality is "bad") and particularly strong (value quality is "good").
selective_explanation(
model,
alternatives = NULL,
print = TRUE,
as_character = FALSE,
round = NULL,
id = NULL,
evaluate = FALSE,
...
)
model |
A DexiModel object. Required. |
alternatives |
A |
print |
|
as_character |
|
round |
An integer number, argument to |
id |
|
evaluate |
|
... |
Optional parameters for |
A list of lists: For each alternative contains a list of two data.frames, corresponding
to "bad"
and "good"
qualities, respectively.
May be pretty-printed using print_selective_explanation()
.
value_qualities()
, value_text()
, print_selective_explanation()
, evaluate()
# Load "Car.dxi"
CarDxi <- system.file("extdata", "Car.dxi", package = "DEXiR")
Car <- read_dexi(CarDxi)
# Print selective explanation of two Car$alternatives.
selective_explanation(Car)
alt <- Car$alternative("MyCar",
BUY.PRICE="low", MAINT.PRICE="*", X.PERS="more", X.DOORS="4", LUGGAGE=2, SAFETY=c(1, 3))
alte <- Car$evaluate(alt)
# Print selective explanation of `alte`.
selective_explanation(Car, alte)
# Print selective explanation of both `alt` and `alte`.
selective_explanation(Car, rbind.data.frame(alt, alte))