Home   >   User Resources   >   Online Help   >   apaGraph.Layout.Spectral
 

 

Function index Version 3.0.0

apaGraph.Layout.Spectral(Edges, NumberOfNodes, IsWeighted, NoiseAmount)

Excel=apaGraph.Layout.Spectral(Edges, NumberOfNodes, IsWeighted, NoiseAmount)

Result

Spectral layout of a graph defined by an edge list. Returns a matrix with the node index in the first column and the x/y coordinates in the next two columns.

Syntax

Edges: n x 3 edge list, the first two columns containing the node indices, the third column the distance between the two nodes (smaller = closer, e.g. sqrt(2(1-ρ)) for correlations ρ)

NumberOfNodes: deprecated and ignored; the nodes are inferred from the edge list

IsWeighted: TRUE to use the third column as edge distances, so that more similar nodes are placed closer together; FALSE to use unit distances

NoiseAmount: amount of noise added to the coordinates; 0 adds no noise, larger values add more noise

In weighted mode, the distances are divided by their median and clipped to [0.05, 20] and converted into similarities 1/distance, which are the entries of the weighted adjacency matrix used for the graph Laplacian.

Pressing Esc aborts the calculation; the function then returns "Calculation aborted by user."