An open API service indexing awesome lists of open source software.

https://github.com/guap-ml/guap

Open-source evaluation metric for linking Machine Learning model outputs with Business outcomes
https://github.com/guap-ml/guap

evaluation-metrics machine-learning python

Last synced: 6 months ago
JSON representation

Open-source evaluation metric for linking Machine Learning model outputs with Business outcomes

Awesome Lists containing this project

README

          


guap


From algorithms outputs to business outcomes.



guap is an open-source python package that helps the data team to get ML evaluation metrics everyone can agree on by converting your model output to business outcomes, a.k.a. profits.


🤖 🪄 📈





Documentation |
Colab Demo |
Twitter |
Blog |
Public roadmap




Made with love


py version



version

## 🧞‍♂️ Why should I use guap?
Our mission with guap is to align all stakeholders with measurable business outcomes by including the three core teams — business, data science, and IT — throughout the life cycle of the AI models.

* Make collaboration healthier and clearer between tech and non-tech people
* Make better decisions at every stage of the ML project lifecycle

Want to know more? Read [Why guap exist](https://ulyssebottello.com/why-guap/).

## ✨ Features
We're on the journey to make sure every ML use-case that goes to production is a valuable one. And it starts with a simple way to estimate the expected profit/cost of a model based on its confusion matrix.

* **Get the total profit** Based on the test set, guap will give you the total expected profit based on the cost matrix. A great way to have an overview of the model profitability.
* **Average profit per prediction** Along with the total profit score, guap will give you the average profit/cost per prediction. Perfect if you have costs per prediction, or if you need to estimate the profitability while scaling.

That's it...for now! Keep up-to-date with release announcements on Twitter [@guap_ml](https://twitter.com/guap_ml)!

## 🪄 Quick tour
To immediately use guap, here is how to quickly generate a profit/cost evaluation metric for a given confusion matrix:

Install `guap` library:
```
pip install guap
```
Flexible integration for any Python script:
```python
>>> !pip install guap
>>> from guap.metrics import guap_metric

# Set the confusion matrix
>>> y_true = ["cat", "ant", "cat", "cat", "ant", "bird"]
>>> y_pred = ["ant", "ant", "cat", "cat", "ant", "cat"]

# Set the cost matrix
>>> cost_matrix = [[200, -1500], [0, 1000]]

# Generate guap scores
>>> output = guap_metric(y_true, y_pred, cost_matrix)
[{'sum': -9600, 'average': -3200}]
```

Easy, right?

## 👀 Demo
Do you need a step-by-step guide on how to use guap on a very simple ML use case? We got you.

You can use guap metrics at every step of the ML lifecycle and on unlimited use-cases. But we think an interactive demo is worth thousands and thousands of words.

We've picked a situation where we evaluate and compare two simple models on a Kaggle dataset, and a use-case deeply rooted with cost savings: credit card fraud detection.

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1XmqitZzUtK-rohKXgKpjqR16npKjx6m9#offline=true&sandboxMode=true)

## ⌛ Status
- [x] Alpha: We are demoing guap to users and receiving feedback
- [ ] Private Beta
- [ ] Public Beta
- [ ] Official Launch

Watch "releases" of this repo to get notified of major updates, and give the star button a click whilst you're there.

## 🙏 Contributing
Pull requests are welcome. You don't know where to start? let's talk [@guap_ml](https://twitter.com/guap_ml)!

## 💖 License
[Apache License 2.0](http://www.apache.org/licenses/)