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

Description Objects from the Class Slots Extends Methods See Also Examples

Description

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

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## 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)

kappalab documentation built on May 2, 2019, 5:49 a.m.