GithubHelp home page GithubHelp logo

classicvalues / metriks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intuit/metriks

1.0 1.0 0.0 24 KB

Python package of commonly used metrics for evaluating information retrieval models.

License: MIT License

Python 100.00%

metriks's Introduction

Python Version build coverage


metriks is a Python package of commonly used metrics for evaluating information retrieval models.

Available Metrics

Python API Description
metriks.recall_at_k(y_true, y_prob, k) Calculates recall at k for binary classification ranking problems.
metriks.precision_at_k(y_true, y_prob, k) Calculates precision at k for binary classification ranking problems.
metriks.mean_reciprocal_rank(y_true, y_prob) Gets a positional score on how well you did at rank 1, rank 2, etc.
metriks.ndcg(y_true, y_prob, k) A score for measuring the quality of a set of ranked results.
metriks.label_mean_reciprocal_rank(y_true, y_prob) Determines the average rank each label was placed across samples. Only labels that are relevant in the true data set are considered in the calculation.
metriks.confusion_matrix_at_k(y_true, y_prob, k) Generates binary predictions from probabilities by evaluating the top k items (in ranked order by y_prob) as true.

Installation

Install using pip

pip install metriks

Alternatively, specific distributions can be downloaded from the github release page. Once downloaded, install the .tar.gz file directly:

pip install metriks-\*.tar.gz

Development

1. (Optional) If you have virtualenv and virtualenvwrapper create a new virtual environment:

mkvirtualenv metriks

This isolates your specific project dependencies to avoid conflicts with other projects.

2. Clone and install the repository:

git clone [email protected]:intuit/metriks.git
cd metriks
pip install -e .

This will install a version to an isolated environment in editable mode. As you update the code in the repository, the new code will immediately be available to run within the environment (without the need to pip install it again)

3. Run the tests using tox:

pip install tox
tox

Tox will run all of the tests in isolated environments

metriks's People

Contributors

hipstersmoothie avatar karenclo avatar piyalibanerj avatar wontonswaggie avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.