calc_ranking_metrics
- rectools.metrics.ranking.calc_ranking_metrics(metrics: Dict[str, Union[NDCG, MAP, MRR]], merged: DataFrame) Dict[str, float] [source]
Calculate any ranking metrics (MAP, NDCG and MRR for now).
Works with pre-prepared data.
Warning: It is not recommended to use this function directly. Use calc_metrics instead.
- Parameters
- Returns
Dictionary where keys are the same with keys in metrics and values are metric calculation results.
- Return type
dict(str->float)