SYMBOL INDEX (319 symbols across 31 files) FILE: linkpred/cli.py function setup_logger (line 18) | def setup_logger(): function load_profile (line 27) | def load_profile(fname): function get_config (line 39) | def get_config(args=None): function handle_arguments (line 61) | def handle_arguments(args=None): function main (line 171) | def main(args=None): FILE: linkpred/evaluation/listeners.py function _timestamped_filename (line 27) | def _timestamped_filename(basename, ext="txt"): class Listener (line 31) | class Listener: method __init__ (line 32) | def __init__(self): method on_dataset_finished (line 36) | def on_dataset_finished(self, dataset): method on_run_finished (line 39) | def on_run_finished(self): class EvaluatingListener (line 43) | class EvaluatingListener(Listener): method __init__ (line 44) | def __init__(self, **kwargs): method on_prediction_finished (line 50) | def on_prediction_finished(self, scoresheet, dataset, predictor): class CachePredictionListener (line 60) | class CachePredictionListener(Listener): method __init__ (line 61) | def __init__(self): method on_prediction_finished (line 66) | def on_prediction_finished(self, scoresheet, dataset, predictor): class CacheEvaluationListener (line 71) | class CacheEvaluationListener(Listener): method __init__ (line 72) | def __init__(self): method on_evaluation_finished (line 76) | def on_evaluation_finished(self, evaluation, dataset, predictor): class FMaxListener (line 81) | class FMaxListener(Listener): method __init__ (line 82) | def __init__(self, name, beta=1): method on_evaluation_finished (line 89) | def on_evaluation_finished(self, evaluation, dataset, predictor): class PrecisionAtKListener (line 99) | class PrecisionAtKListener(Listener): method __init__ (line 100) | def __init__(self, name, k=10): method on_evaluation_finished (line 107) | def on_evaluation_finished(self, evaluation, dataset, predictor): class Plotter (line 144) | class Plotter(Listener): method __init__ (line 145) | def __init__(self, name, xlabel="", ylabel="", filetype="pdf", chart_l... method add_line (line 162) | def add_line(self, predictor=""): method chart_look (line 175) | def chart_look(self, default=None): method on_evaluation_finished (line 182) | def on_evaluation_finished(self, evaluation, dataset, predictor): method on_run_finished (line 186) | def on_run_finished(self): class RecallPrecisionPlotter (line 198) | class RecallPrecisionPlotter(Plotter): method __init__ (line 199) | def __init__( method add_line (line 206) | def add_line(self, predictor=""): method setup_coords (line 211) | def setup_coords(self, evaluation): class FScorePlotter (line 216) | class FScorePlotter(Plotter): method __init__ (line 217) | def __init__(self, name, xlabel="#", ylabel="F-score", beta=1, **kwargs): method setup_coords (line 222) | def setup_coords(self, evaluation): class ROCPlotter (line 227) | class ROCPlotter(Plotter): method __init__ (line 228) | def __init__( method setup_coords (line 234) | def setup_coords(self, evaluation): class MarkednessPlotter (line 239) | class MarkednessPlotter(Plotter): method __init__ (line 240) | def __init__(self, name, xlabel="Miss", ylabel="Precision", **kwargs): method setup_coords (line 245) | def setup_coords(self, evaluation): FILE: linkpred/evaluation/scoresheet.py class BaseScoresheet (line 11) | class BaseScoresheet(defaultdict): method __init__ (line 29) | def __init__(self, data=None): method __setitem__ (line 34) | def __setitem__(self, key, val): method process_data (line 37) | def process_data(self, data): method ranked_items (line 41) | def ranked_items(self, threshold=None): method top (line 67) | def top(self, n=10): method from_record (line 71) | def from_record(line, delimiter="\t"): method to_record (line 76) | def to_record(key, value, delimiter="\t"): method from_file (line 81) | def from_file(cls, fname, delimiter="\t", encoding="utf-8"): method to_file (line 90) | def to_file(self, fname, delimiter="\t", encoding="utf-8"): class Pair (line 97) | class Pair: method __init__ (line 113) | def __init__(self, *args): method _sorted_tuple (line 132) | def _sorted_tuple(t): method __eq__ (line 141) | def __eq__(self, other): method __ne__ (line 147) | def __ne__(self, other): method __lt__ (line 150) | def __lt__(self, other): method __gt__ (line 156) | def __gt__(self, other): method __le__ (line 162) | def __le__(self, other): method __ge__ (line 165) | def __ge__(self, other): method __getitem__ (line 168) | def __getitem__(self, idx): method __hash__ (line 171) | def __hash__(self): method __str__ (line 174) | def __str__(self): method __repr__ (line 177) | def __repr__(self): method __iter__ (line 180) | def __iter__(self): method __len__ (line 183) | def __len__(self): class Scoresheet (line 187) | class Scoresheet(BaseScoresheet): method __getitem__ (line 194) | def __getitem__(self, key): method __setitem__ (line 197) | def __setitem__(self, key, val): method __delitem__ (line 200) | def __delitem__(self, key): method process_data (line 203) | def process_data(self, data, weight="weight"): method from_record (line 212) | def from_record(line, delimiter="\t"): method to_record (line 217) | def to_record(key, value, delimiter="\t"): FILE: linkpred/evaluation/static.py class UndefinedError (line 12) | class UndefinedError(Exception): class StaticEvaluation (line 16) | class StaticEvaluation: method __init__ (line 19) | def __init__(self, retrieved=None, relevant=None, universe=None): method update_counts (line 75) | def update_counts(self): method add_retrieved_item (line 87) | def add_retrieved_item(self, item): method update_retrieved (line 90) | def update_retrieved(self, new): function ensure_defined (line 114) | def ensure_defined(func): function ensure_universe_known (line 124) | def ensure_universe_known(func): class EvaluationSheet (line 135) | class EvaluationSheet: method __init__ (line 136) | def __init__(self, data=None, relevant=None, universe=None): method __len__ (line 164) | def __len__(self): method tp (line 168) | def tp(self): method fp (line 172) | def fp(self): method fn (line 176) | def fn(self): method tn (line 180) | def tn(self): method to_file (line 183) | def to_file(self, fname, *args, **kwargs): method from_file (line 187) | def from_file(cls, fname, *args, **kwargs): method precision (line 192) | def precision(self): method recall (line 196) | def recall(self): method fallout (line 201) | def fallout(self): method miss (line 206) | def miss(self): method accuracy (line 211) | def accuracy(self): method f_score (line 215) | def f_score(self, beta=1): method generality (line 238) | def generality(self): FILE: linkpred/exceptions.py class LinkPredError (line 4) | class LinkPredError(Exception): FILE: linkpred/linkpred.py function for_comparison (line 24) | def for_comparison(G, exclude=None): function pretty_print (line 37) | def pretty_print(name, params=None): function _read_pajek (line 56) | def _read_pajek(*args, **kwargs): function read_network (line 76) | def read_network(fh): class LinkPred (line 107) | class LinkPred: method __init__ (line 116) | def __init__(self, config=None): method excluded (line 147) | def excluded(self): method network (line 163) | def network(self, key): method preprocess (line 171) | def preprocess(self): method setup_output (line 189) | def setup_output(self): method do_predict_all (line 240) | def do_predict_all(self): method predict_all (line 266) | def predict_all(self): method process_predictions (line 276) | def process_predictions(self): FILE: linkpred/network/addremove.py function assert_is_percentage (line 11) | def assert_is_percentage(pct): function add_random_edges (line 17) | def add_random_edges(G, pct): function remove_random_edges (line 37) | def remove_random_edges(G, pct): function add_remove_random_edges (line 57) | def add_remove_random_edges(G, pct_add, pct_remove): FILE: linkpred/network/algorithms.py function rooted_pagerank (line 11) | def rooted_pagerank(G, root, alpha=0.85, beta=0, weight="weight"): function simrank (line 44) | def simrank(G, nodelist=None, c=0.8, num_iterations=10, weight="weight"): function raw_google_matrix (line 83) | def raw_google_matrix(G, nodelist=None, weight="weight"): FILE: linkpred/predictors/base.py class Predictor (line 8) | class Predictor: method __init__ (line 35) | def __init__(self, G, eligible=None, excluded=None): method __str__ (line 78) | def __str__(self): method __call__ (line 81) | def __call__(self, *args, **kwargs): method predict (line 84) | def predict(self, *args, **kwargs): method eligible (line 87) | def eligible(self, u, v): method eligible_node (line 95) | def eligible_node(self, v): method eligible_nodes (line 105) | def eligible_nodes(self): method likely_pairs (line 113) | def likely_pairs(self, k=2): function all_predictors (line 133) | def all_predictors(): FILE: linkpred/predictors/eigenvector.py class RootedPageRank (line 9) | class RootedPageRank(Predictor): method predict (line 10) | def predict(self, nbunch=None, alpha=0.85, beta=0, weight="weight", k=... class SimRank (line 59) | class SimRank(Predictor): method predict (line 60) | def predict(self, c=0.8, num_iterations=10, weight="weight"): FILE: linkpred/predictors/misc.py class Community (line 11) | class Community(Predictor): method predict (line 12) | def predict(self): # pylint:disable=E0202 class Copy (line 52) | class Copy(Predictor): method predict (line 53) | def predict(self, weight=None): # pylint:disable=E0202 class Random (line 74) | class Random(Predictor): method predict (line 75) | def predict(self): # pylint:disable=E0202 FILE: linkpred/predictors/neighbour.py class AdamicAdar (line 28) | class AdamicAdar(Predictor): method predict (line 29) | def predict(self, weight=None): class AssociationStrength (line 54) | class AssociationStrength(Predictor): method predict (line 55) | def predict(self, weight=None): class CommonNeighbours (line 76) | class CommonNeighbours(Predictor): method predict (line 77) | def predict(self, alpha=1.0, weight=None): class Cosine (line 114) | class Cosine(Predictor): method predict (line 115) | def predict(self, weight=None): class DegreeProduct (line 136) | class DegreeProduct(Predictor): method predict (line 137) | def predict(self, weight=None, minimum=1): class Jaccard (line 161) | class Jaccard(Predictor): method predict (line 162) | def predict(self, weight=None): class NMeasure (line 183) | class NMeasure(Predictor): method predict (line 184) | def predict(self, weight=None): function _predict_overlap (line 211) | def _predict_overlap(predictor, function, weight=None): class MaxOverlap (line 226) | class MaxOverlap(Predictor): method predict (line 227) | def predict(self, weight=None): class MinOverlap (line 240) | class MinOverlap(Predictor): method predict (line 241) | def predict(self, weight=None): class Pearson (line 254) | class Pearson(Predictor): method predict (line 255) | def predict(self, weight=None): class ResourceAllocation (line 288) | class ResourceAllocation(Predictor): method predict (line 289) | def predict(self, weight=None): FILE: linkpred/predictors/path.py class GraphDistance (line 10) | class GraphDistance(Predictor): method predict (line 11) | def predict(self, weight="weight", alpha=1): function matrix_power (line 62) | def matrix_power(arr, n): class Katz (line 73) | class Katz(Predictor): method predict (line 74) | def predict(self, beta=0.001, max_power=5, weight="weight", dtype=None): FILE: linkpred/predictors/util.py function neighbourhood (line 4) | def neighbourhood(G, n, k=1): function neighbourhood_intersection_size (line 13) | def neighbourhood_intersection_size(G, a, b, weight=None, k=1): function neighbourhood_size (line 27) | def neighbourhood_size(G, u, weight=None, k=1, power=2): function neighbourhood_union_size (line 44) | def neighbourhood_union_size(G, a, b, weight=None, k=1, power=2): FILE: linkpred/preprocess.py function without_low_degree_nodes (line 8) | def without_low_degree_nodes(G, minimum=1, eligible=None): function without_uncommon_nodes (line 38) | def without_uncommon_nodes(networks, eligible=None): function without_selfloops (line 81) | def without_selfloops(G): FILE: linkpred/util.py function all_pairs (line 5) | def all_pairs(iterable): function progressbar (line 10) | def progressbar(it, prefix="", size=60): function load_function (line 33) | def load_function(full_functionname): function interpolate (line 51) | def interpolate(curve): function itersubclasses (line 59) | def itersubclasses(cls, _seen=None): FILE: tests/test_addremove.py function test_add_random_edges (line 11) | def test_add_random_edges(): function test_remove_random_edges (line 26) | def test_remove_random_edges(): function test_add_remove_random_edges (line 41) | def test_add_remove_random_edges(): FILE: tests/test_cli.py function temp_empty_file (line 11) | def temp_empty_file(): class TestProfileFile (line 18) | class TestProfileFile: method setup_method (line 19) | def setup_method(self): method teardown_method (line 30) | def teardown_method(self): method test_load_profile_yaml (line 38) | def test_load_profile_yaml(self): method test_load_profile_json (line 50) | def test_load_profile_json(self): method test_load_profile_error (line 62) | def test_load_profile_error(self): method test_get_config (line 73) | def test_get_config(self): function test_no_training_file (line 97) | def test_no_training_file(): function test_nonexisting_predictor (line 102) | def test_nonexisting_predictor(): function test_handle_arguments (line 107) | def test_handle_arguments(): FILE: tests/test_evaluation_static.py class TestStaticEvaluation (line 15) | class TestStaticEvaluation: method setup_method (line 16) | def setup_method(self): method test_init (line 22) | def test_init(self): method test_update_retrieved (line 44) | def test_update_retrieved(self): method test_update_retrieved_num_universe (line 59) | def test_update_retrieved_num_universe(self): method test_update_retrieved_full (line 75) | def test_update_retrieved_full(self): method test_ret_no_universe_subset (line 84) | def test_ret_no_universe_subset(self): method test_rel_no_universe_subset (line 88) | def test_rel_no_universe_subset(self): method test_ret_larger_than_universe (line 92) | def test_ret_larger_than_universe(self): method test_rel_larger_than_universe (line 96) | def test_rel_larger_than_universe(self): class TestEvaluationSheet (line 101) | class TestEvaluationSheet: method setup_method (line 102) | def setup_method(self): method test_init (line 110) | def test_init(self): method test_to_file_from_file (line 143) | def test_to_file_from_file(self): method test_measures (line 152) | def test_measures(self): method test_measures_with_empty_rel_and_ret (line 192) | def test_measures_with_empty_rel_and_ret(self): method test_f_score (line 210) | def test_f_score(self): FILE: tests/test_functional.py function test_simple_run (line 11) | def test_simple_run(): FILE: tests/test_linkpred.py function test_imports (line 23) | def test_imports(): function test_for_comparison (line 32) | def test_for_comparison(): function test_pretty_print (line 46) | def test_pretty_print(): function test_read_unknown_network_type (line 60) | def test_read_unknown_network_type(): function test_read_network (line 66) | def test_read_network(): function test_read_pajek (line 88) | def test_read_pajek(): function test_LinkPred_without_predictors (line 125) | def test_LinkPred_without_predictors(): class TestLinkpred (line 130) | class TestLinkpred: method teardown_method (line 131) | def teardown_method(self): method config_file (line 134) | def config_file(self, training=False, test=False, **kwargs): method test_init (line 162) | def test_init(self): method test_excluded (line 173) | def test_excluded(self): method test_preprocess_only_training (line 183) | def test_preprocess_only_training(self): method test_preprocess_training_and_test (line 188) | def test_preprocess_training_and_test(self): method test_setup_output_evaluating_without_test (line 194) | def test_setup_output_evaluating_without_test(self): method test_setup_output (line 199) | def test_setup_output(self): method test_predict_all (line 221) | def test_predict_all(self): method test_process_predictions (line 245) | def test_process_predictions(self): FILE: tests/test_listeners.py function test_timestamped_filename (line 17) | def test_timestamped_filename(): function test_EvaluatingListener (line 24) | def test_EvaluatingListener(): function test_CachePredictionListener (line 51) | def test_CachePredictionListener(): function test_CacheEvaluationListener (line 63) | def test_CacheEvaluationListener(): FILE: tests/test_predictors_base.py function test_bipartite_common_neighbour (line 7) | def test_bipartite_common_neighbour(): function test_bipartite_common_neighbours_equivalent_projection (line 19) | def test_bipartite_common_neighbours_equivalent_projection(): function test_postprocessing (line 28) | def test_postprocessing(): function test_all_predictors (line 40) | def test_all_predictors(): FILE: tests/test_predictors_eigenvector.py class TestEigenvectorRuns (line 6) | class TestEigenvectorRuns: method setup_method (line 15) | def setup_method(self): method test_rooted_pagerank_runs (line 19) | def test_rooted_pagerank_runs(self): method test_simrank_runs (line 23) | def test_simrank_runs(self): class TestEigenVector (line 28) | class TestEigenVector: method test_rooted_pagerank (line 29) | def test_rooted_pagerank(self): method test_rooted_pagerank_weighted (line 32) | def test_rooted_pagerank_weighted(self): method test_rooted_pagerank_alpha (line 35) | def test_rooted_pagerank_alpha(self): method test_rooted_pagerank_beta (line 38) | def test_rooted_pagerank_beta(self): method test_rooted_pagerank_k (line 41) | def test_rooted_pagerank_k(self): method test_simrank (line 44) | def test_simrank(self): method test_simrank_c (line 47) | def test_simrank_c(self): method test_simrank_weighted (line 50) | def test_simrank_weighted(self): FILE: tests/test_predictors_misc.py class TestCopy (line 7) | class TestCopy: method setup_method (line 8) | def setup_method(self): method test_copy_unweighted (line 12) | def test_copy_unweighted(self): method test_copy_weighted (line 16) | def test_copy_weighted(self): function test_community (line 21) | def test_community(): function test_community_exclude_noneligible (line 27) | def test_community_exclude_noneligible(): function test_random (line 39) | def test_random(): function test_random_exclude_noneligible (line 46) | def test_random_exclude_noneligible(): FILE: tests/test_predictors_neighbour.py class TestUnweighted (line 10) | class TestUnweighted: method setup_method (line 11) | def setup_method(self): method test_adamic_adar (line 15) | def test_adamic_adar(self): method test_association_strength (line 25) | def test_association_strength(self): method test_common_neighbours (line 30) | def test_common_neighbours(self): method test_cosine (line 35) | def test_cosine(self): method test_degree_product (line 45) | def test_degree_product(self): method test_jaccard (line 61) | def test_jaccard(self): method test_nmeasure (line 66) | def test_nmeasure(self): method test_maxoverlap (line 76) | def test_maxoverlap(self): method test_minoverlap (line 81) | def test_minoverlap(self): method test_pearson (line 86) | def test_pearson(self): method test_resource_allocation (line 91) | def test_resource_allocation(self): class TestWeighted (line 97) | class TestWeighted: method setup_method (line 98) | def setup_method(self): method test_adamic_adar (line 104) | def test_adamic_adar(self): method test_association_strength (line 114) | def test_association_strength(self): method test_common_neighbours (line 119) | def test_common_neighbours(self): method test_cosine (line 124) | def test_cosine(self): method test_degree_product (line 134) | def test_degree_product(self): method test_jaccard (line 150) | def test_jaccard(self): method test_nmeasure (line 155) | def test_nmeasure(self): method test_maxoverlap (line 165) | def test_maxoverlap(self): method test_minoverlap (line 170) | def test_minoverlap(self): method test_pearson (line 175) | def test_pearson(self): method test_resource_allocation (line 180) | def test_resource_allocation(self): FILE: tests/test_predictors_path.py function test_katz (line 9) | def test_katz(): class TestGraphDistance (line 32) | class TestGraphDistance: method setup_method (line 33) | def setup_method(self): method test_unweighted (line 39) | def test_unweighted(self): method test_weighted (line 59) | def test_weighted(self): method test_weighted_alpha (line 76) | def test_weighted_alpha(self): FILE: tests/test_preprocess.py function test_without_uncommon_nodes (line 10) | def test_without_uncommon_nodes(): function test_without_low_degree_nodes (line 30) | def test_without_low_degree_nodes(): function test_without_selfloops (line 45) | def test_without_selfloops(): FILE: tests/test_scoresheet.py class TestBaseScoresheet (line 9) | class TestBaseScoresheet: method setup_method (line 10) | def setup_method(self): method test_ranked_items (line 13) | def test_ranked_items(self): method test_sets_with_threshold (line 22) | def test_sets_with_threshold(self): method test_with_too_large_threshold (line 27) | def test_with_too_large_threshold(self): method test_top (line 32) | def test_top(self): method test_to_file_from_file (line 42) | def test_to_file_from_file(self): class TestScoresheetFile (line 50) | class TestScoresheetFile: method setup_method (line 51) | def setup_method(self): method test_to_file (line 57) | def test_to_file(self): method test_from_file (line 64) | def test_from_file(self): function test_pair (line 73) | def test_pair(): function test_pair_identical_elements (line 87) | def test_pair_identical_elements(): function test_pair_different_types (line 92) | def test_pair_different_types(): function test_scoresheet (line 97) | def test_scoresheet(): function test_scoresheet_process_data (line 108) | def test_scoresheet_process_data(): FILE: tests/test_util.py function test_all_pairs (line 6) | def test_all_pairs(): function test_load_function (line 12) | def test_load_function(): function test_load_function_no_modulename (line 18) | def test_load_function_no_modulename(): function test_interpolate (line 23) | def test_interpolate(): function test_itersubclasses (line 31) | def test_itersubclasses(): function test_itersubclasses_from_type (line 51) | def test_itersubclasses_from_type(): FILE: tests/utils.py function assert_array_equal (line 6) | def assert_array_equal(a1, a2): function temp_file (line 15) | def temp_file(suffix=".tmp"):