Skip to main content
Ctrl+K
⭐ Star on Github 🎤 Give Feedback

ER-Evaluation's Documentation

Site Navigation

  • README
  • User Guide
  • Examples
  • API Doc
  • Credits
  • GitHub

Site Navigation

  • README
  • User Guide
  • Examples
  • API Doc
  • Credits
  • GitHub

Section Navigation

  • All Functions
    • compress_memberships
    • clusters_to_graph
    • clusters_to_membership
    • clusters_to_pairs
    • graph_to_clusters
    • graph_to_membership
    • graph_to_pairs
    • isclusters
    • isgraph
    • ismembership
    • ispairs
    • membership_to_clusters
    • membership_to_graph
    • membership_to_pairs
    • pairs_to_clusters
    • pairs_to_graph
    • pairs_to_membership
    • load_pv_data
    • load_pv_disambiguations
    • load_rldata500
    • load_rldata500_disambiguations
    • load_rldata10000
    • load_rldata10000_disambiguations
    • count_extra
    • count_missing
    • error_indicator
    • error_metrics
    • expected_extra
    • expected_missing
    • expected_relative_extra
    • expected_relative_missing
    • expected_size_difference
    • splitting_entropy
    • cluster_sizes_from_table
    • error_indicator_from_table
    • error_metrics_from_table
    • expected_extra_from_table
    • expected_missing_from_table
    • expected_relative_extra_from_table
    • expected_relative_missing_from_table
    • expected_size_difference_from_table
    • fit_dt_regressor
    • pred_cluster_sizes_from_table
    • record_error_table
    • b_cubed_precision_estimator
    • b_cubed_recall_estimator
    • cluster_f_estimator
    • cluster_precision_estimator
    • cluster_recall_estimator
    • estimates_table
    • pairwise_f_estimator
    • pairwise_precision_estimator
    • pairwise_recall_estimator
    • avg_cluster_size_estimator
    • homonymy_rate_estimator
    • matching_rate_estimator
    • name_variation_estimator
    • summary_estimates_table
    • adjusted_rand_score
    • b_cubed_f
    • b_cubed_precision
    • b_cubed_recall
    • cluster_completeness
    • cluster_f
    • cluster_homogeneity
    • cluster_precision
    • cluster_recall
    • cluster_v_measure
    • metrics_table
    • pairwise_f
    • pairwise_precision
    • pairwise_recall
    • rand_score
    • add_ests_to_summaries
    • compare_plots
    • plot_cluster_errors
    • plot_cluster_sizes_distribution
    • plot_comparison
    • make_dt_regressor_plot
    • plot_dt_regressor_sunburst
    • plot_dt_regressor_tree
    • plot_dt_regressor_treemap
    • plot_entropy_curve
    • plot_estimates
    • plot_metrics
    • plot_performance_disparities
    • plot_summaries
    • expand_grid
    • load_module_parquet
    • load_module_tsv
    • relevant_prediction_subset
    • sample_clusters
    • average_cluster_size
    • cluster_hill_number
    • cluster_sizes
    • cluster_sizes_distribution
    • homonymy_rate
    • matching_rate
    • name_variation_rate
    • number_of_clusters
    • number_of_links
    • summary_statistics
    • MembershipVector
  • er_evaluation.data_structures
  • er_evaluation.datasets
  • er_evaluation.error_analysis
  • er_evaluation.estimators
  • er_evaluation.metrics
  • er_evaluation.plots
  • er_evaluation.summary
  • er_evaluation.search
  • er_evaluation.utils
  • API Doc
  • All Functions
  • number_of_links

number_of_links#

er_evaluation.number_of_links(membership)[source]#

Number of pairwise links associated with a given clustering.

Parameters:

membership (Series) – Membership vector representation of a clustering.

Returns:

Number of pairs of elements belonging to the same cluster. Note that clusters identified by NA values are excluded.

Return type:

int

Examples

>>> membership = pd.Series(index=[1,2,3,4,5,6,7,8], data=[1,1,2,3,2,4,4,4])
>>> number_of_links(membership)
5.0

previous

number_of_clusters

next

summary_statistics

Show Source

© Copyright 2023, Olivier Binette.

Built with the PyData Sphinx Theme 0.14.4.