Function NetworKit::RandomLinkSampler::byPercentage

Function Documentation

Graph NetworKit::RandomLinkSampler::byPercentage(const Graph &G, double percentage)

Returns a graph that contains percentage percent of links form the given graph G. The links are randomly selected from G until the given percentage is reached.

Parameters:
  • G – The graph to construct the training graph from

  • percentage – Percentage of links regarding the number of links in the given graph that should be in the returned graph

Returns:

a graph that contains the given percentage of links from G