alis.link_analysis.spam_mass
alis.link_analysis.spam_mass#
- alis.link_analysis.spam_mass(M, S, beta=0.8, tol=1e-06, max_iter=100)[source]#
Compute the spam mass given a set of trustworthy pages
- Parameters
- Mnumpy array
Transition Matrix: Array of shape (n, n), where n is the number of nodes in the network
- betafloat
probability of following an outlink; passed to page_rank_ts
- Slist
indices of trustworthy pages (indices start at 0)
- tolfloat
Tolerance: Iteration stops if the distance between previous and updated PageRank vectors goes below this value
- max_iterinteger
Maximum number of iterations
- Returns
- pnumpy array
Vector containing the spam mass