poprox_recommender.evaluation.metrics#

Functions

convert_df_to_article_set(rec_df)

measure_profile_recs(profile)

Measure a single user profile's recommendations.

Classes

ProfileRecs(profile_id, recs, truth)

A user profile's recommendations (possibly from multiple algorithms and stages)

poprox_recommender.evaluation.metrics.rank_biased_overlap(recs_list_a, recs_list_b, p=0.9, k=10)#

Computes the RBO metric defined in: Webber, William, Alistair Moffat, and Justin Zobel. “A similarity measure for indefinite rankings.” ACM Transactions on Information Systems (TOIS) 28.4 (2010): 20.

https://dl.acm.org/doi/10.1145/1852102.1852106

Parameters:
Return type:

float

class poprox_recommender.evaluation.metrics.ProfileRecs(profile_id, recs, truth)#

Bases: NamedTuple

A user profile’s recommendations (possibly from multiple algorithms and stages)

Parameters:
profile_id: UUID#

Alias for field number 0

recs: DataFrame#

Alias for field number 1

truth: DataFrame#

Alias for field number 2

poprox_recommender.evaluation.metrics.measure_profile_recs(profile)#

Measure a single user profile’s recommendations. Returns the profile ID and an ItemList of evaluation metrics.

Parameters:

profile (ProfileRecs)

Return type:

list[dict[str, Any]]

Modules

rbo