Learn R Programming

QuACN (version 1.8.0)

calculateDescriptors: Generalized descriptor calculation

Description

The method calculates multiple descriptors for a list of graphs.

Usage

calculateDescriptors(graphs, ..., labels=FALSE, log=FALSE)

Arguments

graphs
either a list of or a single graphNEL object.
...
descriptors to calculate and arguments to pass, see `Details'.
labels
whether or not the columns of the resulting data frame should be named using the getLabels() method.
log
whether or not informative messages about the progress of the calculation should be printed

Value

the desired descriptors, respectively. The rows will be named according to the graph list; the column names are the names of the called functions if labels is FALSE, otherwise the label expressions as returned by getLabels() (and found in the vignette).

Details

calculateDescriptors() calls each function specified in `...' for every graph in the given list and creates a data frame containing the calculated data. You can specify the functions either as strings (such as “totalAdjacency”) or using the numbers from the following table (e.g., 2001). For convenience, the multiples of 1000 denote entire groups of descriptors.

1000
--- all of 1xxx
1001
wiener
1002
harary
1003
balabanJ
1004
meanDistanceDeviation
1005
compactness
1006
productOfRowSums
1007
hyperDistancePathIndex
1008
dobrynin
2000
--- all of 2xxx
2001
totalAdjacency
2002
zagreb1
2003
zagreb2
2004
modifiedZagreb
2005
augmentedZagreb
2006
variableZagreb
2007
randic
2008
complexityIndexB
2009
normalizedEdgeComplexity
2010
atomBondConnectivity
2011
geometricArithmetic1
2012
geometricArithmetic2
2013
geometricArithmetic3
2014
narumiKatayama
3000
--- all of 3xxx
3001
topologicalInfoContent
3002
bonchev1
3003
bonchev2
3004
bertz
3005
radialCentric
3006
vertexDegree
3007
balabanlike1
3008
balabanlike2
3009
graphVertexComplexity
3010
informationBondIndex
3011
edgeEqualityMIC
3012
edgeMagnitudeMIC
3013
symmetryIndex
3014
bonchev3
3015
graphDistanceComplexity
3016
distanceDegreeMIC
3017
distanceDegreeEquality
3018
distanceDegreeCompactness
3019
informationLayerIndex
4000
--- all of 4xxx
4001
mediumArticulation
4002
efficiency
4003
graphIndexComplexity
4004
offdiagonal
4005
spanningTreeSensitivity
4006
distanceDegreeCentric
4007
distanceCodeCentric
5000
--- all of 5xxx
5001
infoTheoreticGCM: vertcent, exp
5002
infoTheoreticGCM: vertcent, lin
5003
infoTheoreticGCM: sphere, exp
5004
infoTheoreticGCM: sphere, lin
5005
infoTheoreticGCM: pathlength, exp
5006
infoTheoreticGCM: pathlength, lin
5007
infoTheoreticGCM: degree, exp
5008
infoTheoreticGCM: degree, lin
5009
infoTheoreticLabeledV1: exp
5010
infoTheoreticLabeledV1: lin
5011
infoTheoreticLabeledV2
5012
infoTheoreticLabeledE: exp
5013
infoTheoreticLabeledE: lin
6000
--- all of 6xxx
6001
eigenvalueBased: adjacencyMatrix, s=1
6002
eigenvalueBased: adjacencyMatrix, s=2
6003
eigenvalueBased: laplaceMatrix, s=1
6004
eigenvalueBased: laplaceMatrix, s=2
6005
eigenvalueBased: distanceMatrix, s=1
6006
eigenvalueBased: distanceMatrix, s=2
6007
eigenvalueBased: distancePathMatrix, s=1
6008
eigenvalueBased: distancePathMatrix, s=2
6009
eigenvalueBased: augmentedMatrix, s=1
6010
eigenvalueBased: augmentedMatrix, s=2
6011
eigenvalueBased: extendedAdjacencyMatrix, s=1
6012
eigenvalueBased: extendedAdjacencyMatrix, s=2
6013
eigenvalueBased: vertConnectMatrix, s=1
6014
eigenvalueBased: vertConnectMatrix, s=2
6015
eigenvalueBased: randomWalkMatrix, s=1
6016
eigenvalueBased: randomWalkMatrix, s=2
6017
eigenvalueBased: weightStrucFuncMatrix_lin, s=1
6018
eigenvalueBased: weightStrucFuncMatrix_lin, s=2
6019
eigenvalueBased: weightStrucFuncMatrix_exp, s=1
6020
eigenvalueBased: weightStrucFuncMatrix_exp, s=2
6021
energy
6022
laplacianEnergy
6023
estrada
6024
laplacianEstrada
6025
spectralRadius
7000
--- all of 7xxx
7001
oneEdgeDeletedSubgraphComplexity
7002
twoEdgesDeletedSubgraphComplexity
7003
globalClusteringCoeff
8000
--- all of 8xxx
8001
connectivityID
8002
minConnectivityID
8003
primeID
8004
bondOrderID
8005
balabanID
8006
minBalabanID
8007
weightedID

The arguments to these functions, such as the distance matrix or the list of vertex degrees, will be automatically supplied and reused. After each function (or group of functions), regardless of whether it was referred to by name or by its assigned number, you may optionally pass extra arguments as a list, but note that this will not override the calculated arguments. If you wish to pass the same extra arguments to multiple functions, you can concatenate the latter to a vector.

When functions are given by name, an “@NAME” suffix can be used to give the column a different name in the output data frame. This is needed when you want to calculate a descriptor more than once with varying arguments.

If log is TRUE, a progress message is printed to the standard output connection for each graph in the list.

Examples

Run this code

library(RBGL)
set.seed(123)
g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE)

calculateDescriptors(g, 1000, 2002, 2003)

calculateDescriptors(g, "randic", "offdiagonal", 7000, labels=TRUE)

# these will give the same results (although named differently):
calculateDescriptors(g, c(6011, 6013), list(s=3))
calculateDescriptors(g,
  "eigenvalueBased@ea", list(matrix_function="extendedAdjacencyMatrix", s=3),
  "eigenvalueBased@vc", list(matrix_function="vertConnectMatrix", s=3))

Run the code above in your browser using DataLab