discounting: Discounting masses

Description Usage Arguments Value Examples

View source: R/discounting.R

Description

Discount masses using given factors

Usage

1
discounting(MassIn, alpha)

Arguments

MassIn

Matrix with nb columns and 2^n rows. Parameter n is the number of elements in the discernment frame and nb is the number of experts. Each column is a bba. If there is only one bba, the input could be a vector with length 2^n.

alpha

Discounting factor. A number or a vector with length of ncol(MassIn). If it is a number, all the bbas will be discounted using the same factor. If it is a vector with length ncol{MassIn}, the bbas will be discounted using the corresponding factor.

Value

Mass matrix with the same dimension as MassIn. The discounted masses, each column is a piece of mass. If the input is a vector, the output is also a vector.

Examples

1
2
3
4
5
6
7
8
## The conflict table for two experts in a discernment frame with three elements
m1=c(0,0.4, 0.1, 0.2, 0.2, 0, 0, 0.1);
m2=c(0,0.2, 0.3, 0.1, 0.1, 0, 0.2, 0.1);
discounting(m1,0.95)
# if only one factor is given, all the masses are discounted using the same factor
discounting(cbind(m1,m2),0.95)
# if the factor vector is given, the masses are discounted using the corresponding factor
discounting(cbind(m1,m2),c(0.95,0.9))

Example output

[1] 0.000 0.380 0.095 0.190 0.190 0.000 0.000 0.145
        m1    m2
[1,] 0.000 0.000
[2,] 0.380 0.190
[3,] 0.095 0.285
[4,] 0.190 0.095
[5,] 0.190 0.095
[6,] 0.000 0.000
[7,] 0.000 0.190
[8,] 0.145 0.145
        m1   m2
[1,] 0.000 0.00
[2,] 0.380 0.18
[3,] 0.095 0.27
[4,] 0.190 0.09
[5,] 0.190 0.09
[6,] 0.000 0.00
[7,] 0.000 0.18
[8,] 0.145 0.19

ibelief documentation built on Jan. 7, 2021, 9:07 a.m.