matching_rate_estimator#
- er_evaluation.estimators.matching_rate_estimator(sample, weights, prediction=None, names=None)[source]#
Compute the matching rate estimator for the given sample, weights, prediction, and names.
- Matching rate:
This is the proportion of elements belonging to clusters of size at least 2.
- Parameters:
sample (Series) – Membership vector indexed by cluster elements and with values corresponding to associated cluster identifier.
weights (Series) – Pandas Series indexed by cluster identifier and with values corresponding to cluster sampling weights (e.g., inverse sampling probabilities). Can also be the string “uniform” for uniform sampling weights, or “cluster_size” for inverse cluster size sampling weights.
prediction (pd.Series, optional) – Membership vector indexed by cluster elements and with values corresponding to associated cluster identifier. Defaults to None.
names (pd.Series, optional) – Series containing names associated with each cluster element. Used for Name Variation and Homonymy Rate Estimates. Defaults to None.
- Returns:
Matching rate estimate and standard deviation estimate.
- Return type:
tuple