kappalab (version 0.4-7)

card.set.func-class: Class "card.set.func"

Description

Class representing a cardinal set function, i.e. whose values depend only on the cardinality of subsets.

Arguments

Objects from the Class

Objects can be created by calls to the function card.set.func.

Slots

n:
Object of class numeric of length 1 equal to the number of elements of the set on which the cardinal set function is defined.
data:
Object of class numeric of length n+1 containing the coefficients of the cardinal set function.

Extends

Class superclass.set.func, directly.

Methods

as.card.game
signature(object = "card.set.func")
as.card.capacity
signature(object = "card.set.func")
as.set.func
signature(object = "card.set.func")
as.Mobius.card.set.func
signature(object = "card.set.func")
as.Mobius.set.func
signature(object = "card.set.func")
conjugate
signature(object = "card.set.func")
interaction.indices
signature(object = "card.set.func")
is.cardinal
signature(object = "card.set.func")
is.kadditive
signature(object = "card.set.func", k = "numeric")
is.monotone
signature(object = "card.set.func")
Mobius
signature(object = "card.set.func")
Shapley.value
signature(object = "card.set.func")
to.data.frame
signature(object = "card.set.func")

See Also

set.func-class, card.set.func, as.card.game-methods, as.card.capacity-methods, as.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, Mobius-methods, Shapley.value-methods, to.data.frame-methods.

Examples

Run this code
## a cardinal set function
mu <- card.set.func(-3:2)

# the attributes of the object
mu@n
mu@data

## some conversions that cannot work
## Not run: as.card.game(mu)
## Not run: as.card.capacityfunc(mu)

## the following should work
as.set.func(mu)

## some tests
is.cardinal(mu)
is.kadditive(mu,2)
is.monotone(mu)

## some transformations
conjugate(mu)
Mobius(mu)
## let us check ...
zeta(Mobius(mu))

## 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.card.set.func.csv",sep="\t")

# finally, some other conversions that should work
mu <- card.set.func(0:5)
as.card.game(mu)
as.card.capacity(mu)

Run the code above in your browser using DataLab