set.func-class {kappalab} | R Documentation |
Class representing a set function.
Objects can be created by calls to the function set.func
.
n
:Object of class numeric
of length 1 equal to
the number of elements of the set on which the set function is defined.
subsets
:Object of class numeric
of length
2^n
containing the power set of the underlying set in
"natural" order. The subsets are coded as integers.
data
:Object of class numeric
of length
2^n
containing the coefficients of the set function in binary order.
Class superclass.set.func
, directly.
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func", k = "numeric")
signature(object = "set.func")
signature(object = "set.func", k =
"numeric")
signature(object = "set.func")
signature(object = "set.func")
signature(object = "set.func")
set.func
,
as.game-methods
,
as.capacity-methods
,
as.card.set.func-methods
,
as.Mobius.set.func-methods
,
as.Mobius.card.set.func-methods
,
conjugate-methods
,
interaction.indices-methods
,
is.cardinal-methods
,
is.kadditive-methods
,
is.monotone-methods
,
k.truncate.Mobius-methods
,
Mobius-methods
,
Shapley.value-methods
,
to.data.frame-methods
.
## a set function mu <- set.func(c(1:8,8:1)/8) ## the attributes of the object mu@n mu@data mu@subsets ## some conversions that cannot work ## Not run: as.game(mu) ## Not run: as.capacity(mu) ## Not run: as.card.set.func(mu) ## some tests is.cardinal(mu) is.kadditive(mu,2) is.monotone(mu) ## some transformations conjugate(mu) Mobius(mu) k.truncate.Mobius(mu,2) ## summary Shapley.value(mu) interaction.indices(mu) # the same summary(mu) ## save the set function to a file d <- to.data.frame(mu) write.table(d,"my.set.func.csv",sep="\t") # finally, some conversions that should work mu <- set.func(c(0,1,1,1,2,2,2,3)) as.game(mu) as.capacity(mu) as.card.set.func(mu)