All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
NetworKit::KatzIndex Class Reference

Implementation of the Katz index. More...

#include <KatzIndex.h>

Public Member Functions

 KatzIndex (count maxPathLength=5, double dampingValue=0.005)
 
 KatzIndex (const Graph &G, count maxPathLength=5, double dampingValue=0.005)
 
std::vector
< LinkPredictor::prediction
runOn (std::vector< std::pair< node, node >> nodePairs) override
 Executes the run-method on aĺl given nodePairs and returns a vector of predictions. More...
 

Additional Inherited Members

Detailed Description

Implementation of the Katz index.

Katz index assigns a pair of nodes a similarity score that is based on the sum of the weighted number of paths of length l where l is smaller than a given limit.

Constructor & Destructor Documentation

NetworKit::KatzIndex::KatzIndex ( count  maxPathLength = 5,
double  dampingValue = 0.005 
)
explicit
Parameters
maxPathLengthMaximal length of the paths to consider
dampingValueUsed to exponentially damp every addend of the sum. Should be in (0, 1]
NetworKit::KatzIndex::KatzIndex ( const Graph G,
count  maxPathLength = 5,
double  dampingValue = 0.005 
)
explicit
Parameters
GThe graph to operate on
maxPathLengthMaximal length of the paths to consider
dampingValueUsed to exponentially damp every addend of the sum. Should be in (0, 1]

Member Function Documentation

std::vector< LinkPredictor::prediction > NetworKit::KatzIndex::runOn ( std::vector< std::pair< node, node >>  nodePairs)
overridevirtual

Executes the run-method on aĺl given nodePairs and returns a vector of predictions.

The result is a vector of pairs where the first element is the node-pair and it's second element the corresponding score generated by the run-method. The method makes use of parallelisation.

Parameters
nodePairsNode-pairs to run the predictor on
Returns
a vector of pairs containing the given node-pair as the first element and it's corresponding score as the second element. The vector is sorted ascendingly by node-pair

Reimplemented from NetworKit::LinkPredictor.


The documentation for this class was generated from the following files: