Description Usage Arguments Details Value References Examples
This function is used as the first step in
weight.differenceToIdeal
and weight.entropy
for normalizing a matrix.
1 | normalize.altMethod(aMatrix, attr, cost_ids = NULL)
|
aMatrix |
a numeric (decision) matrix - if matrix has only one row, then all values will be normalized to 1 even if the initial value is 0. |
attr |
attributes IDs, vector of integer numbers corresponding to the
attributes you desire to use; attr are assumed to be 1-indexed. Even if not
all attributes are given the function normalizes all columns, by default as
benefit type unless shown otherwise with |
cost_ids |
argument used to convert selected cost attributes into benefit attributes. Integer vector. |
This functions uses an alternative approach to the one used in
gainLoss
in regard to cost_ids
. Instead of multiplying all
column values with (-1) so that lower values become the higher values, it
normalizes relative to the lowest value, as given by [1] and [2]. Main
difference in the result is that this normalizing function does not return
negative values.
a normalized matrix
[1]Ma, J., Fan, Z. P., & Huang, L. H. (1999). A subjective and objective integrated approach to determine attribute weights. European journal of operational research, 112(2), 397-404.
[2] Fan, Z. P. (1996). Complicated multiple attribute decision making: theory and applications (Doctoral dissertation, Ph. D. Dissertation, North-eastern University, Shenyang, PRC).
1 2 3 | # Runnable
normalize.altMethod(matrix(1:16, 4, 4))
normalize.altMethod(matrix(1:16, 4, 4), attr=1:4, cost_ids = c(2,4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.