evaluate {DEXiR} | R Documentation |
Evaluates decision alternatives. Essentially, this is a bottom-up aggregation method:
starting with basic attributes (or prune
d aggregate attributes), values of each
alternative are gradually aggregated towards the root
attribute,
according to evaluation_order()
. The aggregation
at each individual DexiAttribute is governed by the corresponding DexiAttribute$funct
.
When alternative values are sets or distributions (see DEXiR-package),
then evaluate()
tries all possible combinations of values of the descendant attributes.
evaluate(
model,
alternatives = model$alternatives,
root = model$root,
method = EnumEvalMethod,
bounding = FALSE,
prune = list(),
norm = NULL,
and = NULL,
or = NULL
)
model |
|
alternatives |
A data frame containing data of one or more decision alternatives. |
root |
DexiAttribute. Default: |
method |
One of: |
bounding |
|
prune |
|
norm |
Some normalization function of the form |
and |
Some conjunctive aggregation function of the form |
or |
Some disjunctive aggregation function of the form |
evaluate()
implements four aggregation methods:
"set"
, "prob"
, "fuzzy"
and "fuzzynorm"
.
The "set"
method interprets DEXi values as sets. The output value assigned to some attribute
is
composed of the union of all attribute$funct
evaluations for all possible combinations of values of
attribute$inputs
.
The remaining three methods interpret DEXi values as value distributions. They follow the same algorithm,
but use different functions (see evaluation_parameters()
) in three algorithm steps:
normalization, and conjunctive and disjunctive aggregation. All values distributions involved in
calculations are normalized by the function norm()
. All combinations of attribute$input
values are individually evaluated by the corresponding tabular function attribute$funct
.
The value p
of each set of attribute$funct
arguments is determined by the conjunctive
aggregation function and()
over p
's of individual arguments.
Finally, the p
of some output value val
is determined by the
disjunctive aggregation function or()
, applied on the p
's of all partial evaluations that
map to val
.
For the mathematical background and more details about aggregation in DEX, please see
(Trdin, Bohanec, 2018). For default normalization and aggregation functions,
see normalize_function()
, and_function()
and or_function()
.
A data frame containing both input and output (evaluated) values of alternatives
.
evaluation_parameters()
, normalize_function()
,
norm_none()
, norm_max()
, norm_sum()
, and_function()
, or_function()
, bounded_scale_value()
.
# Load "Car.dxi"
CarDxi <- system.file("extdata", "Car.dxi", package = "DEXiR")
Car <- read_dexi(CarDxi)
alt <- Car$alternative("MyCar_set",
BUY.PRICE="low", MAINT.PRICE=2, X.PERS="more", X.DOORS="4", LUGGAGE=2, SAFETY="medium")
Car$evaluate(alt)
# Try the set-based evaluation using the default "set" method
alt <- Car$alternative("MyCar2",
BUY.PRICE="low", MAINT.PRICE="*", X.PERS="more", X.DOORS="4", LUGGAGE=2, SAFETY=2)
Car$evaluate(alt)
# Use value distributions and try the methods "prob", "fuzzy" and "fuzzynorm"
alt <- Car$alternative("MyCar_distr",
BUY.PRICE="low", MAINT.PRICE=distribution(0.1, 0.6, 0.3),
X.PERS="more", X.DOORS="4", LUGGAGE=2, SAFETY=2)
Car$evaluate(alt, method = "prob")
Car$evaluate(alt, method = "fuzzy")
Car$evaluate(alt, method = "fuzzynorm")