Learn R Programming

QuACN (version 1.8.0)

infoTheoreticSum: Add the results of two information functionals

Description

This method creates a meaningful sum of the results of different infoTheoreticGCM and infoTheoreticLabeled... calls.

Usage

infoTheoreticSum(first, second, lambda=1000)

Arguments

first
list returned by the first call to a method based on an information functional.
second
list returned by the second call to a method based on an information functional.
lambda
specifies the scaling constant for the distance measures. The default value is 1000.

Value

The returned list consists of the following items:
entropy
contains the calculated entropy measure.
distance
contains the calculated distance measure.
pis
contains the calculated probability distribution.
fvi
contains the calculated values of the functional for each vertex.

Examples

Run this code
set.seed(987)
g <- randomEGraph(as.character(1:10), 0.3)

nodeDataDefaults(g, "atom") <- "C"
nodeData(g, "2", "atom") <- "O"

edgeDataDefaults(g, "bond") <- 1
edgeData(g, "1", "6", "bond") <- 3
edgeData(g, "2", "8", "bond") <- 2

e <- infoTheoreticLabeledE(g)
v1 <- infoTheoreticLabeledV1(g)
infoTheoreticSum(e, v1)

Run the code above in your browser using DataLab