Functions
IsoRank.isorank
— Function.isorank(G1::SparseMatrixCSC, G2::SparseMatrixCSC,
[alpha::Real=0.85, B::AbstractMatrix=ones(Float64,size(G1,1),size(G2,1))];
<keyword arguments>) -> R [, res, L]
Creates the IsoRank matrix, which contains topological similarities of all nodes across two networks (See Rohit Singh, Jinbo Xu, and Bonnie Berger. (2008) Global alignment of multiple protein interaction networks with application to functional orthology detection, Proc. Natl. Acad. Sci. USA, 105:12763-12768.). That is, finds the PageRank values of the modified adjacency matrix of the product graph of G1 and G2. B
, containing prior node similarities, acts as the personalization vector, allowing you to incorporate external information. If you don't have node similarities, you can still create a good IsoRank matrix by damping like PageRank does.
Arguments
G1,G2
: two adjacency matrices of undirected networksB
: matrix of node similarities betweenG1
andG2
, not necessarily normalizedalpha
: weight between edge and node conservation
Keyword arguments
details=false
: If true, returns (R,res,L) where R is the IsoRank matrix of node similarities, res is the power method detailed results structure, L is the linear operator that the power method finds the eigenvector of; if false, returns RSee
powermethod!
for other keyword arguments
IsoRank.greedyalign
— Function.greedyalign(R::AbstractMatrix,seeds=Vector{Tuple{Int,Int}}();
maxiter=size(R,1)-length(seeds))
Given matrix R
, find a alignment using the greedy method.
Arguments
R
: m x n matrixseeds
: Initial seed node pairsmaxiter
: Stop after aligningmaxiter
node pairs
IsoRank.pagerank
— Function. pagerank(A, alpha=0.85, p = fill(1/size(A,2),size(A,2)),
x=copy(p), Ax=similar(x);
<keyword args>) -> x [, res, L]
Creates PageRank vector.
Arguments
A
: Adjacency matrix of the graph. A[u,v] = 1 if u -> valpha
: Damping.p
: Initial probability vector, or personalization vector, not necessarily normalized.
Keyword arguments
details=false
: If true, returns (x,res,L) where x is the PageRank vector, res is the power method detailed results structure, L is the linear operator that the power method finds the eigenvector of; if false, returns x.See
powermethod!
for other keyword arguments
IsoRank.powermethod!
— Function.powermethod!(A, x, Ax=similar(x);
<keyword arguments>) -> radius, x, [log/history]
Performs power method in order to find the dominant eigenvector of the linear operator A. Eigenvector is normalized w.r.t. L_1 norm. Modifies initial eigenvector estimate x.
Arguments
A
: linear operatorx
: initial estimate of the eigenvector, not necessarily normalizedAx
: scratch space for the iteration process
Keyword arguments
maxiter
: maximum # of iterationstol=eps(Float64) * size(A,2)
: error tolerance in L_1 normlog=true,verbose=true
: logging and printing
IsoRank.kronlm
— Function.kronlm([T], A, B)
Kronecker product of A
and B
, stored as a linear operator (from LinearMaps.jl) so that you don't have to create the actual matrix, i.e. kronlm(A,B)*x == kron(A,B)*x
. This is much faster than directly creating the matrix: O(|V|^2+|V||E|)
instead of O(|V|^2 + |E|^2)
for each step of the power iteration where |V|
and |E|
are the number of nodes and edges in the graphs.
Arguments
A,B
: linear operators with multiply and transpose operationsT
: element type of the resulting linear operator