{"id":28916352,"url":"https://github.com/intuit/metriks","last_synced_at":"2025-09-21T17:20:41.156Z","repository":{"id":57441234,"uuid":"220402517","full_name":"intuit/metriks","owner":"intuit","description":"Python package of commonly used metrics for evaluating information retrieval models.","archived":false,"fork":false,"pushed_at":"2020-10-03T06:07:45.000Z","size":27,"stargazers_count":25,"open_issues_count":8,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-17T20:18:14.175Z","etag":null,"topics":["data-science","information-retrieval","metrics","python36"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intuit.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-11-08T06:35:00.000Z","updated_at":"2023-07-23T07:21:32.000Z","dependencies_parsed_at":"2022-09-02T06:43:09.798Z","dependency_job_id":null,"html_url":"https://github.com/intuit/metriks","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/intuit/metriks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fmetriks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fmetriks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fmetriks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fmetriks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intuit","download_url":"https://codeload.github.com/intuit/metriks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intuit%2Fmetriks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260976717,"owners_count":23091507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","information-retrieval","metrics","python36"],"created_at":"2025-06-21T23:38:59.137Z","updated_at":"2025-09-21T17:20:41.132Z","avatar_url":"https://github.com/intuit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: logo/metriks-logo.svg\n\n|python| |build| |coverage|\n\n.. |python| image:: https://img.shields.io/badge/python-3.6%20-blue.svg\n    :target: https://www.python.org/downloads/release/python-360/\n    :alt: Python Version\n\n.. |build| image:: https://travis-ci.com/intuit/metriks.svg?branch=master\n    :target: https://travis-ci.com/intuit/metriks\n\n.. |coverage| image:: https://coveralls.io/repos/github/intuit/metriks/badge.svg?branch=master\n    :target: https://coveralls.io/github/intuit/metriks?branch=master\n\n-----\n\nmetriks is a Python package of commonly used metrics for evaluating information retrieval models.\n\nAvailable Metrics\n---------------------------\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n| Python API                                                 | Description                                                                   |\n+============================================================+===============================================================================+\n| `metriks.recall_at_k(y_true, y_prob, k)`                   | Calculates recall at k for binary classification ranking problems.            |\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n| `metriks.precision_at_k(y_true, y_prob, k)`                | Calculates precision at k for binary classification ranking problems.         |\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n| `metriks.mean_reciprocal_rank(y_true, y_prob)`             | Gets a positional score on how well you did at rank 1, rank 2, etc.           |\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n| `metriks.ndcg(y_true, y_prob, k)`                          | A score for measuring the quality of a set of ranked results.                 |\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n| `metriks.label_mean_reciprocal_rank(y_true, y_prob)`       | Determines the average rank each label was placed across samples. Only labels |\n|                                                            | that are relevant in the true data set are considered in the calculation.     |\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n| `metriks.confusion_matrix_at_k(y_true, y_prob, k)`         | Generates binary predictions from probabilities by evaluating the top k       |\n|                                                            | items (in ranked order by y_prob) as true.                                    |\n+------------------------------------------------------------+-------------------------------------------------------------------------------+\n\nInstallation\n------------\nInstall using `pip \u003chttps://pypi.org/project/pip/\u003e`_\n::\n\n    pip install metriks\n\nAlternatively, specific distributions can be downloaded from the\ngithub `release \u003chttps://github.com/intuit/metriks/releases\u003e`_\npage. Once downloaded, install the ``.tar.gz`` file directly:\n::\n\n    pip install metriks-\\*.tar.gz\n\nDevelopment\n-----------\n1. (*Optional*) If you have `virtualenv` and `virtualenvwrapper` create a new virtual environment:\n::\n\n    mkvirtualenv metriks\n\nThis isolates your specific project dependencies to avoid conflicts\nwith other projects.\n\n2. Clone and install the repository:\n::\n\n    git clone git@github.com:intuit/metriks.git\n    cd metriks\n    pip install -e .\n    \n\nThis will install a version to an isolated environment in editable\nmode. As you update the code in the repository, the new code will\nimmediately be available to run within the environment (without the\nneed to `pip install` it again)\n\n3. Run the tests using `tox`:\n::\n\n    pip install tox\n    tox\n\nTox will run all of the tests in isolated environments \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuit%2Fmetriks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintuit%2Fmetriks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintuit%2Fmetriks/lists"}