|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "code", |
| 5 | + "execution_count": null, |
| 6 | + "metadata": {}, |
| 7 | + "outputs": [], |
| 8 | + "source": [ |
| 9 | + "import numpy as np\n", |
| 10 | + "import matplotlib.pyplot as plt\n", |
| 11 | + "from sklearn.metrics import confusion_matrix\n", |
| 12 | + "from src.datagen import scenarios\n", |
| 13 | + "\n", |
| 14 | + "\n", |
| 15 | + "from sklearn.linear_model import LogisticRegression\n", |
| 16 | + "import src.vis as vis\n", |
| 17 | + "import ipywidgets as widgets\n", |
| 18 | + " \n", |
| 19 | + "\n", |
| 20 | + "scale = {\n", |
| 21 | + " 'training': 1000,\n", |
| 22 | + " 'deployment': 100, \n", |
| 23 | + "} # one meeple = this many people\n", |
| 24 | + "\n", |
| 25 | + "# import bqplot.pyplot as plt\n", |
| 26 | + "# import bqplot as bq\n", |
| 27 | + "import matplotlib.pyplot as plt\n", |
| 28 | + "backend = \"matplotlib\" #bqplot\n", |
| 29 | + "%matplotlib inline\n", |
| 30 | + "\n", |
| 31 | + "%load_ext autoreload\n", |
| 32 | + "%autoreload 2" |
| 33 | + ] |
| 34 | + }, |
| 35 | + { |
| 36 | + "cell_type": "code", |
| 37 | + "execution_count": null, |
| 38 | + "metadata": { |
| 39 | + "scrolled": false |
| 40 | + }, |
| 41 | + "outputs": [], |
| 42 | + "source": [ |
| 43 | + "vis.plot_profitability_distributions(scenarios,backend)\n" |
| 44 | + ] |
| 45 | + }, |
| 46 | + { |
| 47 | + "cell_type": "code", |
| 48 | + "execution_count": null, |
| 49 | + "metadata": { |
| 50 | + "scrolled": false |
| 51 | + }, |
| 52 | + "outputs": [], |
| 53 | + "source": [ |
| 54 | + "vis.plot_feature_importances(scenarios,backend)" |
| 55 | + ] |
| 56 | + }, |
| 57 | + { |
| 58 | + "cell_type": "code", |
| 59 | + "execution_count": null, |
| 60 | + "metadata": { |
| 61 | + "scrolled": false |
| 62 | + }, |
| 63 | + "outputs": [], |
| 64 | + "source": [ |
| 65 | + "vis.plot_fairness_metrics(scenarios,backend)" |
| 66 | + ] |
| 67 | + }, |
| 68 | + { |
| 69 | + "cell_type": "code", |
| 70 | + "execution_count": null, |
| 71 | + "metadata": { |
| 72 | + "scrolled": false |
| 73 | + }, |
| 74 | + "outputs": [], |
| 75 | + "source": [ |
| 76 | + "vis.make_fairness_maps(scenarios)" |
| 77 | + ] |
| 78 | + }, |
| 79 | + { |
| 80 | + "cell_type": "code", |
| 81 | + "execution_count": null, |
| 82 | + "metadata": {}, |
| 83 | + "outputs": [], |
| 84 | + "source": [] |
| 85 | + } |
| 86 | + ], |
| 87 | + "metadata": { |
| 88 | + "kernelspec": { |
| 89 | + "display_name": "Python 3", |
| 90 | + "language": "python", |
| 91 | + "name": "python3" |
| 92 | + }, |
| 93 | + "language_info": { |
| 94 | + "codemirror_mode": { |
| 95 | + "name": "ipython", |
| 96 | + "version": 3 |
| 97 | + }, |
| 98 | + "file_extension": ".py", |
| 99 | + "mimetype": "text/x-python", |
| 100 | + "name": "python", |
| 101 | + "nbconvert_exporter": "python", |
| 102 | + "pygments_lexer": "ipython3", |
| 103 | + "version": "3.8.6" |
| 104 | + } |
| 105 | + }, |
| 106 | + "nbformat": 4, |
| 107 | + "nbformat_minor": 4 |
| 108 | +} |
0 commit comments