GenerateExample {GraphAlignment}R Documentation

Generate example input data


Generate input data which can be used as an example.


GenerateExample(dimA, dimB, filling, covariance, symmetric=FALSE, numOrths=0, correlated=NA)


dimA size of network A
dimB size of network B
filling fraction of entries which are not explicitly set to zero
covariance covariance of values
symmetric generate symmetric matrices
numOrths number of diagonal elements to set to 1 in example matrix R
correlated indices of correlated rows and columns


Symmetric example matrices A, B can be generated by specifying TRUE as the 'symmetric' argument. If the 'numOrths' argument is specified, a number of diagonal elements of R equal to the value will be set to 1. If a vector is specified as the 'correlated' argument, the specified rows and columns will be set to correlated values. Leaving this argument blank will result in pairwise correlations of all entries in A,B (or, if the matrices are of different rank, all elements of the smaller on will be correlated with the corresponding parts of the larger matrix).


The return value is a list containing example matrices A (a), B (b) and R (r).


  ex<-GenerateExample(dimA=22, dimB=22, filling=.5, covariance=.6,
    symmetric=TRUE, numOrths=10, correlated=seq(1,18))

[Package GraphAlignment version 1.0-0 Index]