Optimize functions
- class regrank.optimize.SpringRankLegacy(alpha=0)[source]
Bases:
object
- compute_sr(A, alpha=0)[source]
Solve the SpringRank system. If alpha = 0, solves a Lagrange multiplier problem. Otherwise, performs L2 regularization to make full rank.
- Arguments:
A: Directed network (np.ndarray, scipy.sparse.csr.csr_matrix) alpha: regularization term. Defaults to 0.
- Output:
ranks: Solution to SpringRank
- static csr_SpringRank(A)[source]
Main routine to calculate SpringRank by solving linear system Default parameters are initialized as in the standard SpringRank model
- Arguments:
A: Directed network (np.ndarray, scipy.sparse.csr.csr_matrix)
- Output:
rank: N-dim array, indeces represent the nodes’ indices used in ordering the matrix A
- get_inverse_temperature(A, ranks)[source]
given an adjacency matrix and the ranks for that matrix, calculates the temperature of those ranks