turicreate.pagerank.PagerankModel

class turicreate.pagerank.PagerankModel(model)

A PageRankModel object contains the pagerank value for each vertex. The pagerank value characterizes the importance of a vertex in the graph using the following recursive definition:

\[pr(i) = reset_probability + (1-reset_probability) \sum_{j\in N(i)} pr(j) / out_degree(j)\]

where \(N(i)\) is the set containing all vertices \(j\) such that there is an edge going from \(j\) to \(i\). Self edges (i.e., edges where the source vertex is the same as the destination vertex) and repeated edges (i.e., multiple edges where the source vertices are the same and the destination vertices are the same) are treated like normal edges in the above recursion.

Currently, edge weights are not taken into account when computing the PageRank.

Below is a list of queryable fields for this model:

Field Description
reset_probability The probability of random jumps to any node in the graph
graph A new SGraph with the pagerank as a vertex property
delta Total changes in pagerank during the last iteration (the L1 norm of the changes)
pagerank An SFrame with each vertex’s pagerank
num_iterations Number of iterations
threshold The convergence threshold in L1 norm
training_time Total training time of the model
max_iterations The maximum number of iterations to run

This model cannot be constructed directly. Instead, use turicreate.pagerank.create() to create an instance of this model. A detailed list of parameter options and code samples are available in the documentation for the create function.

See also

create

Methods

PagerankModel.name(self) Returns the name of the model.
PagerankModel.save(self, location) Save the model.
PagerankModel.summary(self[, output]) Print a summary of the model.