We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crab/scikits/crab/metrics/metrics.py
Lines 319 to 323 in beb3555
I doubt that the calculation of precision and recall is wrong.
The definition of precision is the proportion of the recommendation list (the y_pred) which is contained in the true list(the y_real).
So, I think the calculation of precision should be precision[i] = (intersection_size / float(len(y_items_pred))) if len(y_items_pred) else 0.0
and similarly, the calculation of recall should be recall[i] = (intersection_size / float(len(y_real[i]))) if len(y_real[i]) else 0.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
crab/scikits/crab/metrics/metrics.py
Lines 319 to 323 in beb3555
I doubt that the calculation of precision and recall is wrong.
The definition of precision is the proportion of the recommendation list (the y_pred) which is contained in the true list(the y_real).
So, I think the calculation of precision should be
precision[i] = (intersection_size / float(len(y_items_pred)))
if len(y_items_pred) else 0.0
and similarly, the calculation of recall should be
recall[i] = (intersection_size / float(len(y_real[i])))
if len(y_real[i]) else 0.0
The text was updated successfully, but these errors were encountered: