experiment

class cornac.experiment.Experiment(eval_method, models, metrics, user_based=True, verbose=False)[source]

Experiment Class

Parameters:
  • eval_method (BaseMethod object, required) – The evaluation method (e.g., RatioSplit).
  • models (array of objects Recommender, required) – A collection of recommender models to evaluate, e.g., [C2pf, Hpf, Pmf].
  • metrics (array of object metrics, required) – A collection of metrics to use to evaluate the recommender models, e.g., [Ndcg, Mrr, Recall].
  • user_based (bool, optional, default: True) – Performance will be averaged based on number of users for rating metrics. If False, results will be averaged over number of ratings.
  • avg_results (DataFrame, default: None) – The average result per model.
  • user_results (dictionary, default: {}) – Results per user for each model. Result of user u, of metric m, of model d will be user_results[d][m][u]