Learn R Programming

dst (version 1.8.0)

bca: Basic chance assignment mass function

Description

Function bca is used to define subsets of a finite set \(\Theta\) of possible values and to assign their corresponding mass value.
The set \(\Theta\) is called the frame of discernment. Each subset \(A\) of \(Theta\) with a positive mass value is called a focal element or a proposition. The associated mass value is a number of the (0,1] interval, called "basic chance assignment" (the basic probability assignment of Shafer's book). All other subsets that have not received a positive mass value are assumed to have a mass value of zero.

Usage

bca(
  tt = NULL,
  m,
  qq = NULL,
  fzt = FALSE,
  include_all = FALSE,
  cnames = NULL,
  con = NULL,
  ssnames = NULL,
  idvar = NULL,
  infovar = NULL,
  varnames = NULL,
  valuenames = NULL,
  inforel = NULL
)

Value

y An object of class bcaspec called a bca for "basic chance assignment":

  • tt The table of focal elements. Rownames of the matrix of focal elements are generated from the column names of the elements of the frame. See nameRows for details.

  • qq Commonality functions from the frame of discernment to \([0,1]\)

  • spec A two column matrix. First column contains numbers given to the subsets, 1 to nrow(tt). Second column contains the mass values of the subsets.

  • con The measure of conflict.

  • infovar The number of the variable and the size of the frame of discernment.

  • varnames The name of the variable.

  • valuenames A list of length 1 consisting of the name of the variable with the names of the elements of the frame of discernment (the column names of the tt matrix).

  • ssnames A list of subsets names done from the column names of the tt matrix.

  • inforel Set at 0. used in function bcaRel.

Arguments

tt

Mandatory. A (0,1)-matrix or a boolean matrix. The number of columns must match the number of elements (values) of the frame of discernment \(\Theta\). Each row is a subset of \(\Theta\). The last row is the frame \(\Theta\), represented by a vector of 1's.

m

A numeric vector of length equal to the number of rows of the matrix tt. Values of m must lie in the interval (0,1] and must add to one. The mass m(k) represents the chance value allotted to the proposition represented by the row k of the matrix tt.

qq

Commonality functions from the frame of discernment to \([0,1]\)

fzt

= FALSE Whether to use Fast Zeta Transform to construct commonality functions

include_all

= FALSE Put TRUE to include all elements with 0 mass in the bca.

cnames

A character vector containing the names of the elements of the frame of discernment \(\Theta\). The length must be equal to the number of elements of \(\Theta\). The names are first searched in the valuenames parameter. If NULL, column names of the matrix tt are taken if present. Otherwise, names are generated.

con

The measure of conflict can be provided. 0 by default.

ssnames

A list of subsets names which will be obtained from the column names of the tt matrix.

idvar

The number given to the variable. A number is necessary to manage relations between variables and make computations on a graph. 0 if omitted.

infovar

A two-column matrix containing variable identification numbers and the number of elements of the variable. Generated if omitted.

varnames

The name of the variable. Generated if omitted.

valuenames

A list of the names of the variables with the name of the elements of their frame of discernment.

inforel

Not used here. Defined within function bcaRel.

Author

Claude Boivin

Details

There is two ways of defining the bca: a (0,1) matrix or a list of subsets labels.

References

  • Shafer, G., (1976). A Mathematical Theory of Evidence. Princeton University Press, Princeton, New Jersey, p. 38: Basic probability assignment.

  • Guan, J. W. and Bell, D. A., (1991). Evidence Theory and its Applications. Elsevier Science Publishing company inc., New York, N.Y., p. 29: Mass functions and belief functions

Examples

Run this code
tt<- t(matrix(c(1,0,1,1),ncol = 2))
m<- c(.9,.1)
cnames <- c("yes","no")
bca(tt, m)
bca(tt, m, cnames)
tt1<- t(matrix(c(1,0,1,1),ncol = 2))
colnames(tt1) <- c("yes", "no")
m <- c(.9, .1)
bca(tt=tt1, m, idvar = 1)
x <- bca(tt=matrix(c(0,1,1,1,1,0,1,1,1),nrow = 3, 
byrow = TRUE), m = c(0.2,0.5, 0.3), include_all = TRUE,
cnames = c("a", "b", "c"), idvar = 1)
y <- bca(tt=matrix(c(1,0,0,1,1,1),nrow = 2, 
byrow = TRUE), m = c(0.6,0.4), 
cnames = c("a", "b", "c"),varnames = "y", idvar = 1)
vacuous <- bca(matrix(c(1,1,1), nrow = 1), m = 1, cnames = c("a","b","c"), ssnames = c("a","b","c"))

Run the code above in your browser using DataLab