Title: | Evidence Combination in R |
---|---|
Description: | Combine pieces of evidence in the form of uncertainty representations. |
Authors: | Alexander Karlsson |
Maintainer: | Alexander Karlsson <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1-4 |
Built: | 2024-12-07 06:32:09 UTC |
Source: | CRAN |
Package for combining pieces of evidence.
Implements Dempster's, Yager's, modified Dempster's, Bayesian, and credal combination (based on intervals).
Alexander Karlsson
Maintainer: Alexander Karlsson <[email protected]>
Dempster, A. P. (1969), A generalization of Bayesian inference, Journal of the Royal Statistical Society, 30, 205-247
Shafer, G. (1976), A Mathematical Theory of Evidence Princeton University Press
Yager, R. (1987), On the Dempster-Shafer Framework and New Combination Rules, Information Sciences 41: 93-137.
Fixsen, D., Mahler, R. P. S. (1997), The modified Dempster-Shafer approach to classification, IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, 27, 96-104
Arnborg, S. (2006), Robust Bayesianism: Relation to Evidence Theory, Journal of Advances in Information Fusion, 1, 63-74
Karlsson, A., Johansson, R., and Andler, S. F. (2011), Characterization and Empirical Evaluation of Bayesian and Credal Combination Operators, Journal of Advances in Information Fusion, 6, 150-166
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c1 <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) c2 <- credal(c(0.2, 0.2, 0.2), c(0.9, 0.9, 0.9), stateSpace) # combine the credal sets cComb(c1, c2) # construct mass functions m1 <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) m2 <- mass(list("a"=0.2, "b"=0.2, "c"=0.2, "a/b/c"=0.4), stateSpace) # combine the mass functin by using Dempster's combination dComb(m1, m2) # Yager's combination operator yComb(m1, m2) # modified Dempster's combination using uniform prior mComb(m1, m2)
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c1 <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) c2 <- credal(c(0.2, 0.2, 0.2), c(0.9, 0.9, 0.9), stateSpace) # combine the credal sets cComb(c1, c2) # construct mass functions m1 <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) m2 <- mass(list("a"=0.2, "b"=0.2, "c"=0.2, "a/b/c"=0.4), stateSpace) # combine the mass functin by using Dempster's combination dComb(m1, m2) # Yager's combination operator yComb(m1, m2) # modified Dempster's combination using uniform prior mComb(m1, m2)
[
Extract part of evidence structure [
signature(x = "credal", i = "ANY", j="ANY", value="ANY")
Extract probabilities
signature(x = "mass", i = "character", j="missing", value="ANY")
Extract focal element(s)
Alexander Karlsson
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # extract first and second extreme point c[1:2,] # mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # extract focal elements m[c("a","a/b/c")]
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # extract first and second extreme point c[1:2,] # mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # extract focal elements m[c("a","a/b/c")]
[[
Methods for function [[
signature(x="mass", i="character", j="missing")
Extract a single focal element from the list of focal elements
Alexander Karlsson
# construct a state space stateSpace <- c("a", "b", "c") #mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # extract focal element m[["a"]]
# construct a state space stateSpace <- c("a", "b", "c") #mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # extract focal element m[["a"]]
[[<-
Replace part of an evidence structure
signature(x="mass", i="character", j="missing", value="ANY")
Replace focal element(s)
Alexander Karlsson
# construct a state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # obtain value only m[["a"]]
# construct a state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # obtain value only m[["a"]]
[<-
Replace part of an evidence structure
signature(x="credal", i="ANY", j="ANY", value="ANY")
Replace probabilities
signature(x="mass", i="character", j="missing", value="ANY")
Replace focal element(s)
Alexander Karlsson
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # replace first and second extreme point c[1:2,] <- rbind(c(0.1, 0.1, 0.8), c(0.2, 0.2, 0.6)) # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # switch mass on focal elements "b" and "a/b/c" temp <- m["b"] m["b"] <- m["a/b/c"] m["a/b/c"] <- temp
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # replace first and second extreme point c[1:2,] <- rbind(c(0.1, 0.1, 0.8), c(0.2, 0.2, 0.6)) # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # switch mass on focal elements "b" and "a/b/c" temp <- m["b"] m["b"] <- m["a/b/c"] m["a/b/c"] <- temp
Combine evidence in the form of credal sets (based on intervals) using the credal combination operator (also known as the robust Bayesian combination operator). The resulting credal set is approximated by using probability intervals.
cComb(x,y)
cComb(x,y)
x |
credal set or a list of credal sets |
y |
credal set if |
credal set
Alexander Karlsson
Levi, I. (1983), The enterprise of knowledge, The MIT press
Arnborg, S. (2006), Robust Bayesianism: Relation to Evidence Theory, Journal of Advances in Information Fusion, 1, 63-74
Karlsson, A., Johansson, R., and Andler, S. F. (2011), Characterization and Empirical Evaluation of Bayesian and Credal Combination Operators, Journal of Advances in Information Fusion, 6, 150-166
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c1 <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) c2 <- credal(c(0.2, 0.2, 0.2), c(0.9, 0.9, 0.9), stateSpace) # combine the credal sets cComb(c1, c2) # or by cComb(list(c1, c2))
# construct a state space stateSpace <- c("a", "b", "c") # construct credal sets with the given state space c1 <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) c2 <- credal(c(0.2, 0.2, 0.2), c(0.9, 0.9, 0.9), stateSpace) # combine the credal sets cComb(c1, c2) # or by cComb(list(c1, c2))
cComb
Combine credal sets (based on intervals) using the credal combination operator (also known as the robust Bayesian combination operator). For more detail see cComb
.
signature(x = "credal", y = "credal")
Combine two credal sets using the credal combination operator
signature(x = "list", y = "missing")
Combine a list of credal sets using the credal combination operator
Construct a credal set based on probability intervals or a single probability function. The algorithm used for finding the extreme points corresponding to lower and upper bounds is described in De Campos et al. (1994).
credal(x, y, z)
credal(x, y, z)
x |
lower bounds of probability intervals (in the form of a numeric vector) |
y |
upper bounds for probability intervals or missing (i.e., upper bound of |
z |
character vector representing the state space |
A credal set represented by a set of extreme points.
Alexander Karlsson
Levi, I. (1983), The enterprise of knowledge, The MIT press
Arnborg, S. (2006), Robust Bayesianism: Relation to Evidence Theory, Journal of Advances in Information Fusion, 1, 63-74
Karlsson, A., Johansson, R., Andler, S. F. (2011), Characterization and Empirical Evaluation of Bayesian and Credal Combination Operators, Journal of Advances in Information Fusion, 6, 150-166
De Campos L. M., Huete, J. F., Moral S., Probability Intervals: a Tool for Uncertain Reasoning,International Journal of Uncertainty, Fuzziness, and Knowledge-Based Systems, 2, 167-196
# state space stateSpace <- c("a", "b", "c") # lower and upper bounds for probability intervals c1 <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # single probability function (lower and upper bounds of probability intervals are equal) c2 <- credal(c(0.1, 0.2, 0.7), c(0.1, 0.2, 0.7), stateSpace)
# state space stateSpace <- c("a", "b", "c") # lower and upper bounds for probability intervals c1 <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # single probability function (lower and upper bounds of probability intervals are equal) c2 <- credal(c(0.1, 0.2, 0.7), c(0.1, 0.2, 0.7), stateSpace)
"credal"
Represents a credal set by a set of extreme points. For more detail see credal
.
Objects can be created by credal
.
extPoints
:Object of class "matrix"
. Each row is an extreme point of the credal set.
signature(x="credal", i="ANY", j="ANY")
: extract an extreme point
signature(x="credal", i="ANY", j="ANY", value="ANY")
: replace and extreme point
signature(x = "credal", y = "credal")
: combine two credal sets
signature(x = "credal", set = "character")
: calculate the lower bound for a specific set of states
signature(x = "credal", set = "missing")
: calculate the lower bounds for all singleton states
signature(x = "credal", set = "character")
: calculate the upper bound for a specific set of states
signature(x = "credal", set = "missing")
: calculate the upper bounds for all singleton states
signature(x = "credal")
: access method for the slot points
signature(x = "credal")
: access method for names of singleton states
signature(x = "credal")
: replace method for names of singleton states
Alexander Karlsson
credal
Methods for constructing a credal set. For more detail see credal
.
signature(x = "numeric", y = "missing", z = "character")
Construct a credal set based on the lower bounds of probability intervals for states (1
will be the upper bound for all probability intervals)
signature(x = "numeric", y = "numeric", z = "character")
Construct a credal based on probability intervals for states
Alexander Karlsson
Combine evidence in the form of mass functions using Dempster's combination operator.
dComb(x,y)
dComb(x,y)
x |
single mass function or a list of mass functions |
y |
single mass function if |
mass function
Alexander Karlsson
Dempster, A. P. (1969), A generalization of Bayesian inference, Journal of the Royal Statistical Society, 30, 205-247
Shafer, G. (1976), A Mathematical Theory of Evidence Princeton University Press
# state space stateSpace <- c("a", "b", "c") # mass functions m1 <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) m2 <- mass(list("a"=0.2, "a/b/c"=0.8), stateSpace) # Dempster's combination dComb(m1, m2) # or dComb(list(m1, m2))
# state space stateSpace <- c("a", "b", "c") # mass functions m1 <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) m2 <- mass(list("a"=0.2, "a/b/c"=0.8), stateSpace) # Dempster's combination dComb(m1, m2) # or dComb(list(m1, m2))
dComb
Combine mass functions using Dempster's combination operator. For more detail
see dComb
.
signature(x = "mass", y = "mass")
Combine two mass functions using Dempster's combination operator
signature(x = "list", y = "missing")
Combine a list of mass functions using Dempster's combination operator
Alexander Karlsson
Discounts a mass function.
disc(x,y)
disc(x,y)
x |
a mass function |
y |
degree of reliability |
mass function
Alexander Karlsson
Smets, P. (2000), Data Fusion in the Transferable Belief Model, Proceedings of the Third International Conference on Information Fusion
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) # source is only 80% reliable mDisc <- disc(m, 0.8)
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) # source is only 80% reliable mDisc <- disc(m, 0.8)
disc
Discount an evidence structure. For more detail see disc
signature(x = "mass", y = "numeric")
Discount a mass function.
Displays some license information about EvCombR.
EvCombRLicense()
EvCombRLicense()
Alexander Karlsson
EvCombRLicense()
EvCombRLicense()
Returns the extreme points of a credal set
extPoints(x)
extPoints(x)
x |
a credal set |
a matrix where the extreme points are stored by row
Alexander Karlsson
# state space stateSpace <- c("a", "b", "c") # construct credal set c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # obtain extrem points eMat <- extPoints(c)
# state space stateSpace <- c("a", "b", "c") # construct credal set c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # obtain extrem points eMat <- extPoints(c)
extPoints
Returns the set of extreme points of a credal set. For more detail see extPoints
.
signature(x = "credal")
Returns the set of extreme points
Alexander Karlsson
Returns the set of focal elements of a mass function.
focal(x)
focal(x)
x |
a mass function |
focal elements of x
Alexander Karlsson
Dempster, A. P. (1969), A generalization of Bayesian inference, Journal of the Royal Statistical Society, 30, 205-247
Shafer, G., (1976), A Mathematical Theory of Evidence Princeton University Press, 1976
# state space stateSpace <- c("a", "b", "c") # mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # obtain focal elements focal(m)
# state space stateSpace <- c("a", "b", "c") # mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # obtain focal elements focal(m)
focal
Methods for function focal
signature(x = "mass")
Access function for slot focal
See further focal
Replaces focal elements of a mass function.
focal(x) <- value
focal(x) <- value
x |
a mass function |
value |
new focal elements for the mass function |
mass function with focal elements replaced.
Alexander Karlsson
Dempster, A. P. (1969), A generalization of Bayesian inference, Journal of the Royal Statistical Society, 30, 205-247
Shafer, G., (1976), A Mathematical Theory of Evidence Princeton University Press
# state space stateSpace <- c("a", "b", "c") # mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # replace focal elements focal(m) <- list("a/b"=1)
# state space stateSpace <- c("a", "b", "c") # mass functions m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # replace focal elements focal(m) <- list("a/b"=1)
focal<-
Replacement function for focal elements. For more detail see focal<-
signature(x = "mass")
Replace focal elements
Calculate the lower bounds for a vector of sets
lower(x, sets)
lower(x, sets)
x |
credal set or mass function |
sets |
vector of sets where each set is represented by state names separated by "/". If sets are missing, lower bounds on singletons are calculated. |
lower bound of mass or probability for each set in the vector sets or if sets is missing lower bounds on singletons
This is equivalent to belief in Dempster-Shafer theory
Alexander Karlsson
Shafer, G., (1976), A Mathematical Theory of Evidence Princeton University Press
Walley, P. (2000), Towards a unified theory of imprecise probability, International Journal of Approximate Reasoning, 24, 125-148
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # credal set c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # calculate lower bounds lower(m, c("a", "a/b")) lower(c, c("a", "a/b")) # lower bounds on singletons lower(m)
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # credal set c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # calculate lower bounds lower(m, c("a", "a/b")) lower(c, c("a", "a/b")) # lower bounds on singletons lower(m)
lower
Calculate lower bounds for a vector of sets with respect to the evidence structure. For more detail see lower
signature(x = "credal", sets = "character")
obtain lower bounds for a vector of sets
signature(x = "credal", sets = "missing")
obtain lower bounds for all singleton states
signature(x = "mass", sets = "character")
obtain the belief, or lower bounds, for a vector of sets
signature(x = "mass", sets = "missing")
obtain the belief, or lower bounds, for all singleton states
Construct a mass function based on a named list of focal elements or a massQ-class
object. For more information, see the details section.
mass(x, y)
mass(x, y)
x |
a named list of focal elements or a |
y |
a character vector representing the state space or missing if |
Focal elements are represented by the notation "<s1>/.../<sn>" where <s1>...<sn> are any states within the state space (see the examples below). Note that the word "ES" and the symbol "/" are reserved.
mass function
Alexander Karlsson
Dempster, A. P. (1969), A generalization of Bayesian inference, Journal of the Royal Statistical Society, 30, 205-247
Shafer, G. (1976), A Mathematical Theory of Evidence Princeton University Press
# state space stateSpace <- c("a", "b", "c") # construct mass functions m1 <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) m2 <- mass(list("a"=0.1, "b"=0.1, "c"=0.1, "a/b"=0.1, "a/c"=0.1, "b/c"=0.1, "a/b/c"=0.4), stateSpace) # apply Yager's combination operator, m12 will be a massQ-object m12Q <- yComb(m1,m2) # contruct a mass function from an massQ-object m12 <- mass(m12Q)
# state space stateSpace <- c("a", "b", "c") # construct mass functions m1 <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) m2 <- mass(list("a"=0.1, "b"=0.1, "c"=0.1, "a/b"=0.1, "a/c"=0.1, "b/c"=0.1, "a/b/c"=0.4), stateSpace) # apply Yager's combination operator, m12 will be a massQ-object m12Q <- yComb(m1,m2) # contruct a mass function from an massQ-object m12 <- mass(m12Q)
"mass"
Represents a mass function by a list of focal elements and corresponding mass. For more detail see mass
.
Objects can be created by credal
.
focal
:a list of focal elements represented by statenames seperated by "/"
space
:the state space represented by a character vector
signature(x = "mass", i = "character", j = "missing")
: extract focal elements
signature(x = "mass", i = "character", j = "missing")
: extract a single focal element
signature(x="mass", i="character", j="missing", value="ANY")
: replace focal elements
signature(x="mass", i="character", j="missing", value="ANY")
: replace a single focal element
signature(x = "mass", y = "mass")
: combine two mass functions by Dempster's combination
signature(x = "mass")
: access focal elements
signature(x = "mass")
: replace focal elements
signature(x = "mass", set = "character")
: calculate the lower bounds for some focal element
signature(x = "mass", set = "missing")
: calculate the lower bounds for singletons
signature(x = "mass", y = "mass", z = "function")
: combine two mass functions by modified Dempster's combination using a prior distribution z
signature(x = "mass", y = "mass", z = "missing")
: combine two mass functions by modified Dempster's combination using a uniform prior distribution z
signature(x = "mass")
: calculate the pignistic transformation for single states
signature(x = "mass")
: calculate the relative plausibility for single states
signature(x = "mass")
: access the state space (frame of discernment)
signature(x = "mass")
: replace the state space (frame of discernment)
signature(x = "mass", set = "character")
: calculate the upper bound for some focal element
signature(x = "mass", set = "character")
: calculate the upper bounds for singletons
signature(x = "mass", y = "mass")
: combine two mass functions using Yager's rule
signature(x = "mass", y = "numeric")
: discount mass function
Alexander Karlsson
Dempster, A. P. (1969), A generalization of Bayesian inference, Journal of the Royal Statistical Society, 30, 205-247
Shafer, G., (1976), A Mathematical Theory of Evidence Princeton University Press
Yager, R. (1987), On the Dempster-Shafer Framework and New Combination Rules, Information Sciences 41: 93-137.
Fixsen, D., Mahler, R. P. S. (1997), The modified Dempster-Shafer approach to classification, IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, 27, 96-104
mass
Methods for constructing a mass function. For more detail see mass
signature(x = "list", y = "character")
Construct a mass functions by a named list of focal elements and a given state space
signature(x = "massQ", y = "missing")
Construct a mass function from a massQ-class
object
Alexander Karlsson
"massQ"
Class that maintains information about the mass on the empty set. The class is used for Yager's combination operator
A massQ
-object is obtained as a result of Yager's combination operator yComb
.
qEmpty
:mass on the empty set with respect to the previous combination
focal
:a list of focal elements represented by statenames seperated by "/"
space
:the state space represented by a character vector
Class "mass"
, directly.
All methods inherited from mass-class
and in addition:
signature(x = "massQ", y = "missing")
: convert the massQ
-object to a mass
-object
Alexander Karlsson
Yager, R. (1987), On the Dempster-Shafer Framework and New Combination Rules, Information Sciences 41: 93-137.
Combine evidence in the form of mass functions using modified Dempster's combination operator.
mComb(x,y,z)
mComb(x,y,z)
x |
single mass function or a list of mass functions |
y |
single mass function if |
z |
prior distribution if |
The prior distribution is provided in the form of a list where the names are equivalent to the state space. See the examples.
mass function
Alexander Karlsson
Fixsen, D., Mahler, R. P. S. (1997), The modified Dempster-Shafer approach to classification, IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, 27, 96-104
# state space stateSpace <- c("a", "b", "c") # mass functions m1 <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) m2 <- mass(list("a"=0.2, "a/b/c"=0.8), stateSpace) # modified Dempster's combination using the uniform prior mComb(m1, m2) # or mComb(list(m1, m2)) # modified Dempster's combination using a specific prior mComb(m1, m2, list("a"=0.1, "b"=0.1, "c"=0.8)) # or mComb(list(m1, m2), list("a"=0.1, "b"=0.1, "c"=0.8))
# state space stateSpace <- c("a", "b", "c") # mass functions m1 <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) m2 <- mass(list("a"=0.2, "a/b/c"=0.8), stateSpace) # modified Dempster's combination using the uniform prior mComb(m1, m2) # or mComb(list(m1, m2)) # modified Dempster's combination using a specific prior mComb(m1, m2, list("a"=0.1, "b"=0.1, "c"=0.8)) # or mComb(list(m1, m2), list("a"=0.1, "b"=0.1, "c"=0.8))
mComb
Combine mass functions using modified Dempster's combination operator. For more detail
see mComb
.
signature(x = "mass", y = "mass", z = "list")
Combine two mass functions using modified Dempster's combination operator and a prior
signature(x = "mass", y = "mass", z = "missing")
Combine two mass functions using modified Dempster's combination operator and the uniform prior
signature(x = "list", y = "list", z = "missing")
Combine a list of mass functions using modified Dempster's combination operator and a prior
signature(x = "list", y = "missing", z = "missing")
Combine a list of mass functions using modified Dempster's combination operator and the uniform prior
The pignistic transformation transforms a mass function into a probability function.
pign(x)
pign(x)
x |
a mass function |
a singleton credal set
Alexander Karlsson
Smets, P. & Kennes, R. (1994), The transferable belief model, Artificial Intelligence, 66, 191-234
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) # obtaina singleton credal set c <- pign(m)
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) # obtaina singleton credal set c <- pign(m)
pign
The pignistic transformation transform a mass function to probability function. For more detail see pign
signature(x = "mass")
Apply the pignistic transformation on a mass function
The relative plausibility transform transform a mass function to a probability function
relPl(x)
relPl(x)
x |
a mass function |
a singleton credal set
Alexander Karlsson
Cobb, B. & Shenoy, P. (2006), On the plausibility transformation for translating belief function models to probability models, International Journal of Approximate Reasoning, 42, 3, 314 - 330
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) # obtaina singleton credal set c <- relPl(m)
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) # obtaina singleton credal set c <- relPl(m)
relPl
The relative plausability transform transforms a mass function to probability function. For more detail see relPl
signature(x = "mass")
Apply the relative plausability transform on a mass function
This functions returns the state space of an evidence structure.
space(x)
space(x)
x |
mass function or credal set |
a character vector with the names within the state space
Alexander Karlsson
# state space stateSpace <- c("a", "b", "c") # construct mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # obtain state space space(m)
# state space stateSpace <- c("a", "b", "c") # construct mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # obtain state space space(m)
space
Returns the state space for an evidence structure. For more detail see space
.
signature(x = "credal")
Returns the state space for a credal set
signature(x = "mass")
Returns the state space for a mass function
Replace the names of the state space
space(x) <- value
space(x) <- value
x |
mass function or credal set |
value |
new state space given as a character vector |
new mass function or credal set with the state space replaced
Alexander Karlsson
# state space stateSpace <- c("a", "b", "c") # construct mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # replace state space space(m) <- c("d", "e", "f")
# state space stateSpace <- c("a", "b", "c") # construct mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # replace state space space(m) <- c("d", "e", "f")
space<-
Replace the state space of an evidence structure. For more details see space
.
signature(x = "credal")
Replace state space of a credal set
signature(x = "mass")
Replace the state space of a mass function
Calculate the upper bounds for a vector of sets
upper(x, sets)
upper(x, sets)
x |
credal set or mass function |
sets |
vector of sets where each set is represented by state names separated by "/". If sets are missing, upper bounds on singletons are calculated. |
upper bound of mass or probability for each set in the vector sets or if sets is missing upper bounds on singletons
This is equivalent to Belief in Dempster-Shafer theory
Alexander Karlsson
Shafer, G., (1976), A mathematical theory of evidence, Princeton University Press
Walley, P. (2000), Towards a unified theory of imprecise probability, International Journal of Approximate Reasoning, 24, 125-148
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # credal set c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # calculate upper bounds upper(m, c("a", "a/b")) upper(c, c("a", "a/b")) # upper bounds on singletons upper(m)
# state space stateSpace <- c("a", "b", "c") # mass function m <- mass(list("a"=0.1, "b"=0.1 , "c"=0.4, "a/b/c"=0.4), stateSpace) # credal set c <- credal(c(0.1, 0.1, 0.1), c(0.8, 0.8, 0.8), stateSpace) # calculate upper bounds upper(m, c("a", "a/b")) upper(c, c("a", "a/b")) # upper bounds on singletons upper(m)
upper
Calculate lower bounds for a vector of sets with respect to the evidence structure. For more detail see upper
signature(x = "credal", sets = "character")
obtain upper bounds for a vector of sets
signature(x = "credal", sets = "missing")
obtain upper bounds for all singletons
signature(x = "mass", sets = "character")
obtain the plausability, or upper bounds, for a vector of sets
signature(x = "mass", sets = "missing")
obtain the plausability, or upper bounds, for all singletons
Combine evidence in the form of mass functions using Yager's combination operator.
yComb(x,y)
yComb(x,y)
x |
single mass function or a list of mass functions |
y |
single mass function if |
mass function (massQ-class
)
Yager's combination operator is quasi-associative and therefore we need to keep track of the mass on the empty set by using the class massQ
.
Alexander Karlsson
Yager, R. (1987), On the Dempster-Shafer Framework and New Combination Rules, Information Sciences 41: 93-137.
# state space stateSpace <- c("a", "b", "c") # mass functions m1 <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) m2 <- mass(list("b"=0.2, "a/b/c"=0.8), stateSpace) # Yager's combination yComb(m1, m2) # or yComb(list(m1, m2))
# state space stateSpace <- c("a", "b", "c") # mass functions m1 <- mass(list("a"=0.1, "a/b/c"=0.9), stateSpace) m2 <- mass(list("b"=0.2, "a/b/c"=0.8), stateSpace) # Yager's combination yComb(m1, m2) # or yComb(list(m1, m2))
yComb
Combine mass functions using Yager's combination operator. For more detail
see yComb
.
signature(x = "mass", y = "mass")
Combine two mass functions using Yager's combination operator
signature(x = "list", y = "missing")
Combine a list of mass functions using Yager's combination operator