All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
NetworKit::LinkThresholder Namespace Reference

Filters given predictions based on some criterion and returns a vector of node-pairs that fulfill the given criterion. More...

Functions

std::vector< std::pair< node,
node > > 
byScore (std::vector< LinkPredictor::prediction > predictions, double minScore)
 Returns the node-pairs whose scores are at least equal to the given minScore. More...
 
std::vector< std::pair< node,
node > > 
byCount (std::vector< LinkPredictor::prediction > predictions, count numLinks)
 Returns the first numLinks highest scored node-pairs. More...
 
std::vector< std::pair< node,
node > > 
byPercentage (std::vector< LinkPredictor::prediction > predictions, double percentageLinks)
 Returns the first percentageLinks percent of the highest scores node-pairs. More...
 

Detailed Description

Filters given predictions based on some criterion and returns a vector of node-pairs that fulfill the given criterion.

This can be used to determine which node-pairs should actually be interpreted as future links and which shouldn't.

Function Documentation

std::vector< std::pair< node, node > > NetworKit::LinkThresholder::byCount ( std::vector< LinkPredictor::prediction >  predictions,
count  numLinks 
)

Returns the first numLinks highest scored node-pairs.

Parameters
predictionsPredictions to filter
numLinksNumber of top-scored node-pairs to return
Returns
the first numLinks highest scored node-pairs
std::vector< std::pair< node, node > > NetworKit::LinkThresholder::byPercentage ( std::vector< LinkPredictor::prediction >  predictions,
double  percentageLinks 
)

Returns the first percentageLinks percent of the highest scores node-pairs.

Parameters
predictionsPredictions to filter
percentageLinksPercentage of highest scored node-pairs to return
Returns
the first percentageLinks percent of the highest scores node-pairs
std::vector< std::pair< node, node > > NetworKit::LinkThresholder::byScore ( std::vector< LinkPredictor::prediction >  predictions,
double  minScore 
)

Returns the node-pairs whose scores are at least equal to the given minScore.

Parameters
predictionsPredictions to filter
minScoreMinimal score that the returned node-pairs should have
Returns
a vector of node-pairs whose scores are at least equal to the given minScore