avg_cluster_size_estimator#
- er_evaluation.estimators.avg_cluster_size_estimator(sample, weights, prediction=None, names=None)[source]#
Compute the average cluster size estimator for the given sample, weights, prediction, and names.
- 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:
Average cluster size estimate and standard deviation estimate.
- Return type:
tuple