statisticianinstilettos / recmetrics

A library of metrics for evaluating recommender systems
MIT License
568 stars 98 forks source link

Unable to import recmetrics #30

Closed kleekaai closed 2 years ago

kleekaai commented 3 years ago

I am working on a recommendation engine using collaborative filtering and wanted to try the metrics provided by recmetrics. Here, the error I get trying to import the package (version 0.0.12).

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-309-301854677c00> in <module>
----> 1 import recmetrics
      2 
      3 recmetrics.long_tail_plot()

~/.virtualenvs/py3/lib/python3.6/site-packages/recmetrics/__init__.py in <module>
----> 1 from .plots import long_tail_plot, mark_plot, mapk_plot, coverage_plot, class_separation_plot, roc_plot, precision_recall_plot
      2 from .metrics import mark, coverage, personalization, intra_list_similarity, rmse, mse, make_confusion_matrix, recommender_precision, recommender_recall

~/.virtualenvs/py3/lib/python3.6/site-packages/recmetrics/plots.py in <module>
      5 from matplotlib.lines import Line2D
      6 from sklearn.metrics import roc_curve, auc, precision_recall_curve, average_precision_score
----> 7 from sklearn.utils.fixes import signature
      8 
      9 

ImportError: cannot import name 'signature'
Daryaggg commented 3 years ago

same problem

itsoum commented 3 years ago

@kleekaai @Daryaggg check several closed issues about this. The answer follow: If you have used pip install recmetrics in order to install the recmetrics probably your version is not aligned with the updated github repository version given that last realease on pypi is Mar 5, 2019. So, you should install manually recmetrics from github.

@statisticianinstilettos @gregwchase maybe you sould update the release on pypi.

Ilias

statisticianinstilettos commented 2 years ago

This should be updated now. There is a new release on pypi