Package it.unimi.dsi.law.big.rank
Class PageRankParallelGaussSeidel
java.lang.Object
it.unimi.dsi.law.big.rank.SpectralRanking
it.unimi.dsi.law.big.rank.PageRank
it.unimi.dsi.law.big.rank.PageRankParallelGaussSeidel
public class PageRankParallelGaussSeidel extends PageRank
A big version of
PageRankParallelGaussSeidel.- Author:
- Sebastiano Vigna
- See Also:
PageRankParallelGaussSeidel,PageRank,SpectralRanking
-
Nested Class Summary
Nested classes/interfaces inherited from class it.unimi.dsi.law.big.rank.SpectralRanking
SpectralRanking.IterationNumberStoppingCriterion, SpectralRanking.NormStoppingCriterion, SpectralRanking.StoppingCriterion -
Field Summary
Fields Modifier and Type Field Description long[][]outdegreeThe outdegree of each node (initialized after the first computation).booleanpseudoRankIf true, an everywhere zero dangling-node distribution will be simulated, resulting in the computation of a pseudorank.Fields inherited from class it.unimi.dsi.law.big.rank.PageRank
alpha, buckets, danglingNodeDistribution, DEFAULT_ALPHA, preference, stronglyPreferentialFields inherited from class it.unimi.dsi.law.big.rank.SpectralRanking
DEFAULT_MAX_ITER, DEFAULT_NORM, DEFAULT_THRESHOLD, graph, iteration, logger, n, rank, STOCHASTIC_TOLERANCE -
Constructor Summary
Constructors Constructor Description PageRankParallelGaussSeidel(ImmutableGraph transpose)Creates a new instance.PageRankParallelGaussSeidel(ImmutableGraph transpose, int requestedThreads, Logger logger)Creates a new instance.PageRankParallelGaussSeidel(ImmutableGraph transpose, Logger logger)Creates a new instance. -
Method Summary
Modifier and Type Method Description voidclear()Clears all data and releases resources by nullingSpectralRanking.rank(i.e., results we no longer be available).voidinit()Basic initialization: we log the damping factor, check that the preference vector is correctly sized and stochastic, fillSpectralRanking.rankwith the preference vector and set the dangling-node distribution depending on the value ofPageRank.stronglyPreferential.static voidmain(String[] arg)doublenormDelta()Return the following values: if a suitable norm vector has been set, an upper bound on the error (the ℓ∞ distance from the rank to be computed); otherwise, an upper bound to the ℓ1 norm of the error, obtained multiplying by α / (1 − α) the ℓ1 norm of the difference between the last two approximations (this idea arose in discussions with David Gleich).voidnormVector(double[][] normVector, double sigma)Sets the norm vector.voidnormVector(String normVectorFilename, double sigma)Sets the norm vector.voidstep()Performs one computation step.voidstepUntil(SpectralRanking.StoppingCriterion stoppingCriterion)CallsSpectralRanking.init()and steps until a given stopping criterion is met.Methods inherited from class it.unimi.dsi.law.big.rank.PageRank
buildPropertiesMethods inherited from class it.unimi.dsi.law.big.rank.SpectralRanking
and, approximateNormVector, buildProperties, isStochastic, or
-
Field Details
-
outdegree
public long[][] outdegreeThe outdegree of each node (initialized after the first computation). -
pseudoRank
public boolean pseudoRankIf true, an everywhere zero dangling-node distribution will be simulated, resulting in the computation of a pseudorank.
-
-
Constructor Details
-
PageRankParallelGaussSeidel
Creates a new instance.- Parameters:
transpose- the transpose of the graph on which to compute PageRank.requestedThreads- the requested number of threads (0 forRuntime.availableProcessors()).logger- a logger that will be passed tosuper().
-
PageRankParallelGaussSeidel
Creates a new instance.- Parameters:
transpose- the transpose of the graph on which to compute PageRank.
-
PageRankParallelGaussSeidel
Creates a new instance.- Parameters:
transpose- the transpose of the graph on which to compute PageRank.logger- a logger that will be passed tosuper().
-
-
Method Details
-
normVector
Sets the norm vector.- Parameters:
normVectorFilename- a file containing a norm vector as a list of doubles inDataInputformat, ornullfor no norm vector.sigma- the value for which the provided norm vector is suitable.- Throws:
IOException
-
normVector
public void normVector(double[][] normVector, double sigma)Sets the norm vector.- Parameters:
normVector- the new norm vector.sigma- the value for which the provided norm vector is suitable.
-
init
Description copied from class:PageRankBasic initialization: we log the damping factor, check that the preference vector is correctly sized and stochastic, fillSpectralRanking.rankwith the preference vector and set the dangling-node distribution depending on the value ofPageRank.stronglyPreferential.- Overrides:
initin classPageRank- Throws:
IOException
-
step
Description copied from class:SpectralRankingPerforms one computation step.- Specified by:
stepin classSpectralRanking- Throws:
IOException
-
stepUntil
Description copied from class:SpectralRankingCallsSpectralRanking.init()and steps until a given stopping criterion is met. The criterion is checked a posteriori (i.e., after each step); this means that at least one step is performed.- Overrides:
stepUntilin classSpectralRanking- Parameters:
stoppingCriterion- the stopping criterion to be used.- Throws:
IOException
-
normDelta
public double normDelta()Return the following values: if a suitable norm vector has been set, an upper bound on the error (the ℓ∞ distance from the rank to be computed); otherwise, an upper bound to the ℓ1 norm of the error, obtained multiplying by α / (1 − α) the ℓ1 norm of the difference between the last two approximations (this idea arose in discussions with David Gleich).- Overrides:
normDeltain classSpectralRanking- Returns:
- an upper bound on the error.
-
clear
public void clear()Description copied from class:SpectralRankingClears all data and releases resources by nullingSpectralRanking.rank(i.e., results we no longer be available). Please extend this method to handle additional attributes.- Overrides:
clearin classSpectralRanking
-
main
public static void main(String[] arg) throws IOException, JSAPException, ClassNotFoundException, ConfigurationException
-