differenceToIdeal: Calculates decision weights using the 'objective approach'

Description Usage Arguments Details Value References Examples

Description

This function is used as the second step in weight.differenceToIdeal for calculating a decision weight for each attr in the decision matrix. The methodology of the 'objective approach' for determining the weights is given by references [1] and [2]. See Details.

Usage

1
differenceToIdeal(normalizedMatrix, attr)

Arguments

normalizedMatrix

a numeric matrix. If indeed normalized it should only contain values between 0 and 1.

attr

attributes IDs, vector of integer numbers corresponding to the attributes you desire to use; attr are assumed to be 1-indexed. Here it represents the number of columns of the input matrix.

Details

The sum of the output of this functions should always equal 1.

It measures the distance of each column value against the best value for a given attribute. A smaller difference should mean that for that attribute a high value was consistently taking in consideration, thus resulting in a higher weight. Two unintended consequences are: 1. matrices with one row will result in the same weight for all columns and 2. for an attribute where the value does not change at all (even if it's a low value) the function will reward it somewhat disproportionately.

Value

a decision weight (numeric vector with a sum of 1)

References

[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).

Examples

1
2
3
4
#Runnable
differenceToIdeal(matrix(c(1.0, 0.85, 0.42, 0, 0.5, 0, 1, 0.7), 4, 2), attr=1:4)
weights <- differenceToIdeal(matrix(c(1.0, 0.85, 0.42, 0, 0.5, 0, 1, 0.7), 2, 4), attr=1:4)
sum(weights) should return 1

avilesd/productConfig documentation built on May 11, 2019, 4:08 p.m.