Link scoring and prediction¶

Warning

Do not manually instantiate these classes using their class constructors. Instantiate these classes using the methods create_link_scorer() and create_link_predictor().

class noesis.links.LinkPredictor(predictor, *args)¶

This class implements the interface for link predictors. These algorithms compute a score for each pair of nodes according to certain specific rules.

Parameters:
  • scorer (string) – Technique used to compute node pair scores. Currently supported techniques are: - Local: ‘CommonNeighbors’, ‘AdamicAdar’, ‘ResourceAllocation’, ‘PreferentialAttachment’, ‘HubDepressed’, ‘HubPromoted’, ‘Jaccard’, ‘LocalLeichtHolmeNewman’, ‘Salton’, and ‘Sorensen’. - Global: ‘Katz’, ‘RandomWalk’, ‘RandomWalkWithRestart’, ‘FlowPropagation’, ‘PseudoinverseLaplacian’, ‘AverageCommuteTime’, ‘RandomForestKernel’, and ‘GlobalLeichtHolmeNewman’.
  • args (parameters) – Parameters for the link predictor. These parameters are specific for each link predictor and more details are provided in NOESIS documentation.
compute(network)¶

Compute scores for each pair of nodes in a given network.

Parameters:network (Network) – Network for which the node pair scores will be computed.
Returns:scores – Matrix of node pair scores.
Return type:ndarray, shape (num_nodes,num_nodes)
class noesis.links.LinkScorer(scorer, *args)¶

This class implements the interface for link scorers. These algorithms compute a score for each link according to certain specific rules.

Parameters:
  • scorer (string) – Technique used to compute link scores. Currently supported techniques are: - Local: ‘CommonNeighbors’, ‘AdamicAdar’, ‘ResourceAllocation’, ‘PreferentialAttachment’, ‘HubDepressed’, ‘HubPromoted’, ‘Jaccard’, ‘LocalLeichtHolmeNewman’, ‘Salton’, and ‘Sorensen’. - Global: ‘Katz’, ‘RandomWalk’, ‘RandomWalkWithRestart’, ‘FlowPropagation’, ‘PseudoinverseLaplacian’, ‘AverageCommuteTime’, ‘RandomForestKernel’, and ‘GlobalLeichtHolmeNewman’.
  • args (parameters) – Parameters for the link scorer. These parameters are specific for each link scorer and more details are provided in NOESIS documentation.
compute(network)¶

Compute scores for each link in a given network.

Parameters:network (Network) – Network for which the link scores will be computed.
Returns:scores – A list of tuples with the format (source_node, target_node, link_score).
Return type:list of tuples
class noesis.links.LinkTask¶

Base abstract class for link-related scores.

NOESIS-Python

Navigation

  • Noesis
  • Network
  • Node scores
  • Link scores and prediction
  • Community detection
  • Network input/output
  • Network layouts
  • Network formation models

Related Topics

  • Documentation overview
    • Previous: Node scoring
    • Next: Community detection

Quick search

©2018, The NOESIS Team. | Powered by Sphinx 1.7.9 & Alabaster 0.7.11