Skip to content

Commit

Permalink
updated readmes with refs to colab notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreFCruz committed Sep 22, 2023
1 parent 71266db commit 038ae60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Table of contents:
> Compatibility is only maintained with **Linux OS**.
>
> If you don't have access to a Linux machine we advise using the free Google
> Colab service ([example Colab notebook here](https://colab.research.google.com/drive/1OElgST6yLpcgsC2i4BE_dJxVny_bLN6F?usp=sharing)).
> Colab service ([example Colab notebook here](https://colab.research.google.com/github/AndreFCruz/fairgbm-fork/blob/add-colab-example/examples/FairGBM-python-notebooks/FairGBM_example_for_equalized_odds_%5Bgoogle_colab%5D.ipynb)).
FairGBM can be installed from [PyPI](https://pypi.org/project/fairgbm/):

Expand All @@ -59,7 +59,7 @@ pip install fairgbm/python-package/

## Getting started

> **Recommended** Python notebook example [here](examples/FairGBM-python-notebooks/UCI-Adult-example-with-hyperparameter-tuning.ipynb) (or see the example Google Colab notebook [here](https://colab.research.google.com/drive/1OElgST6yLpcgsC2i4BE_dJxVny_bLN6F?usp=sharing)).
> **Recommended** Python notebook example [here](examples/FairGBM-python-notebooks/FairGBM_example_for_equalized_odds_[google_colab].ipynb) (Google Colab link [here](https://colab.research.google.com/github/AndreFCruz/fairgbm-fork/blob/add-colab-example/examples/FairGBM-python-notebooks/FairGBM_example_for_equalized_odds_%5Bgoogle_colab%5D.ipynb)).
You can get FairGBM up and running in just a few lines of Python code:

Expand All @@ -84,7 +84,7 @@ Y_test_pred = fairgbm_clf.predict_proba(X_test)[:, -1] # Compute continuous cla

**For Python examples see the [_notebooks folder_](/examples/FairGBM-python-notebooks).**

A more in-depth explanation and other usage examples can be found in the [**_examples folder_**](/examples).
A more in-depth explanation and other usage examples (with python package or compiled binary) can be found in the [**_examples folder_**](/examples).

> **Note**
> FairGBM is a research project, so its default hyperparameters (key-word arguments)
Expand Down Expand Up @@ -161,7 +161,7 @@ constraints** (_e.g._, equal opportunity).

Namely, you can target equality of performance metrics (FPR, FNR, or both) across instances from _two or more_ different
protected groups (see [fairness constraints](#fairness-constraints) section).
Simultaneously (and optionally), you can add global constraints on specific metrics (see [global constraints](#global-constraints) section).
Optionally, you can simultaneously add global constraints on specific metrics (see [global constraints](#global-constraints) section).

### Fairness constraints

Expand Down
8 changes: 4 additions & 4 deletions examples/FairGBM-python-notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ In this folder you can find several FairGBM usage examples.

| _File name_ | _Dataset (size)_ | _Description_ | _Fairness criterion_ |
|-------------------------|------------------|---------------|----------------------|
| [UCI-Adult-example.ipynb](UCI-Adult-example.ipynb) | [UCI Adult](https://archive.ics.uci.edu/ml/datasets/adult) (49K) | Simple example on the popular UCI Adult dataset. | Equal TPR (_equal opportunity_) |
| [UCI-Adult-example-with-hyperparameter-tuning.ipynb](UCI-Adult-example-with-hyperparameter-tuning.ipynb) | [UCI Adult](https://archive.ics.uci.edu/ml/datasets/adult) (49K) | **Recommended**: run hyperparameter-tuning to obtain optimal `multiplier_learning_rate` parameter value. | Equal TPR and FPR (_equalized odds_) |
| [FairGBM hyperparameter search on google colab.ipynb](https://colab.research.google.com/drive/1OElgST6yLpcgsC2i4BE_dJxVny_bLN6F?usp=sharing) | [UCI Adult](https://archive.ics.uci.edu/ml/datasets/adult) (49K) | Easy **Google Colab** example to get up and running with FairGBM. | Equal TPR and FPR (_equalized odds_) |
| [FairGBM_example_for_equalized_odds_[google_colab].ipynb](FairGBM_example_for_equalized_odds_[google_colab].ipynb) ([colab link](https://colab.research.google.com/github/AndreFCruz/fairgbm-fork/blob/add-colab-example/examples/FairGBM-python-notebooks/FairGBM_example_for_equalized_odds_%5Bgoogle_colab%5D.ipynb))| [UCI Adult](https://archive.ics.uci.edu/ml/datasets/adult) (49K) | Simple [*Colab* example](https://colab.research.google.com/github/AndreFCruz/fairgbm-fork/blob/add-colab-example/examples/FairGBM-python-notebooks/FairGBM_example_for_equalized_odds_%5Bgoogle_colab%5D.ipynb) to get up and running with FairGBM. | Equal TPR and FPR (_equalized odds_) |
| [UCI-Adult-example.ipynb](UCI-Adult-example.ipynb) | [UCI Adult](https://archive.ics.uci.edu/ml/datasets/adult) (49K) | Simple local example on the popular UCI Adult dataset. | Equal TPR (_equal opportunity_) |
| [UCI-Adult-example-with-hyperparameter-tuning.ipynb](UCI-Adult-example-with-hyperparameter-tuning.ipynb) | [UCI Adult](https://archive.ics.uci.edu/ml/datasets/adult) (49K) | Example with hyperparameter-tuning to obtain optimal `multiplier_learning_rate` parameter value. | Equal TPR and FPR (_equalized odds_) |

<!--
| [credit-card-fraud-example.ipynb](credit-card-fraud-example.ipynb) | [Credit Card Fraud](https://www.kaggle.com/datasets/mlg-ulb/creditcardfraud) (285K) | Highly class imbalanced dataset in which a trivial classifier achieves 99.8% accuracy. Show-cases the use of both fairness and global constraints! | Equal FPR (predictive equality) |
| [ACSIncome-example.ipynb](ACSIncome-example.ipynb) | [ACSIncome](https://github.com/zykls/folktables) (1.7M) | Large dataset for comparing run-times of popular fairness-aware algorithms. _Requires a sizeable amount of RAM memory (+32GB)._ | Equal FNR (equal opportunity) |
-->

Examples require extra requirements listed in the `requirements.txt` file. Please run `pip install -r requirements.txt` to install them.
Examples may require extra requirements listed in the `requirements.txt` file. Please run `pip install -r requirements.txt` to install them.

0 comments on commit 038ae60

Please sign in to comment.