maciejkula / spotlight

Deep recommender models using PyTorch.
MIT License
2.99k stars 423 forks source link

Add more metrics #56

Open maciejkula opened 7 years ago

maciejkula commented 7 years ago
maciejkula commented 7 years ago

As per https://github.com/maciejkula/spotlight/issues/55

mokarakaya commented 6 years ago

Hello @maciejkula ,

First, thank you very much for implementing Spotlight. I am planning to use Spotlight for my further study.

I'd like to contribute by implementing AUC. Here is my plan for implementation with some questions;

Trapezoidal rule: https://docs.scipy.org/doc/numpy/reference/generated/numpy.trapz.html Simpson's rule: https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.simps.html#scipy.integrate.simps

Do you think the plan is ok for implementation? Please let me know your comments.

Ref1 - Recommender Systems Handbook 2nd edition - 8.3.2.2 Measuring Usage Prediction

ps: we need to hit x=1 and y=1 values, since this metric is generally used to compare multiple algorithms.

nikisix commented 6 years ago

@mkarakaya, You should contribute your idea! Here are my thoughts having helped out in the past on spotlight evaluation metrics:

  1. Yes prec-recall is fine
  2. Of course
  3. I asked the same question, and @maciejkula's response was as you guess -- an array. Personally, I would not be opposed to a single result however, in the case that integrating tons of AUCs were slow and could be sped up somehow by aggregating first.
  4. Sure

Also, have you considered a confusion matrix or at least F1-score?

Good luck!