{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Preliminaries"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Dataset used: \n",
    "- `adult (Adult)` :<br>The UCI Adult dataset contains 14 features, which can be divided into two categories: demographic and income-related.<br> The demographic features include:\n",
    "\n",
    "    age: continuous.<br>\n",
    "    fnlwgt : continuous, represents final weight, which is the number of units in the target population that the responding unit represents.<br>\n",
    "    workclass: categorical, with values 'Private', 'Local-gov', 'Self-emp-not-inc', 'Federal-gov', 'State-gov', 'Self-emp-inc', 'Without-pay'.<br>\n",
    "    education: categorical, with values '11th', 'HS-grad', 'Assoc-acdm', 'Some-college', '10th', ..., '9th', 'Doctorate', '12th', '1st-4th', 'Preschool'.<br>\n",
    "    education-num: continuous with values 1 to 16, one number assigned to each label of education feature.<br>\n",
    "    marital-status: categorical, with values 'Never-married', 'Married-civ-spouse', 'Widowed', 'Separated', 'Divorced', 'Married-spouse-absent', 'Married-AF-spouse'.<br>\n",
    "    occupation: categorical, with values such as 'Machine-op-inspct', 'Farming-fishing', 'Protective-serv'.<br>\n",
    "    relationship: categorical, with values 'Own-child', 'Husband', 'Not-in-family', 'Unmarried', 'Wife', 'Other-relative'.<br>\n",
    "    race: categorical, with values such as white, black, and Asian.<br>\n",
    "    sex: categorical, with values male and female.<br>\n",
    "    \n",
    "    The income-related features include:<br>\n",
    "\n",
    "    hours-per-week: continuous.<br>\n",
    "    native-country: categorical, with values such as United-States, Mexico, and Germany.<br>\n",
    "    capital-gain: continuous, represent the amount of money an individual has gained from the sale of investments such as stocks, bonds, or real estate.<br>\n",
    "    capital-loss: continuous, represent the amount of money an individual has lost from the sale of investments such as stocks, bonds, or real estate..<br>\n",
    "    The target feature is the income, which is binary:<br>\n",
    "    income: categorical, with values less than or equal to 50K and greater than 50K.<br>\n",
    "\n",
    "Reference Links: https://archive.ics.uci.edu/ml/datasets/adult"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from pprint import pprint\n",
    "\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.metrics import classification_report, confusion_matrix, ConfusionMatrixDisplay\n",
    "\n",
    "import os\n",
    "import sys\n",
    "module_path = os.path.abspath(os.path.join('..', '..'))\n",
    "if module_path not in sys.path:\n",
    "    sys.path.append(module_path)\n",
    "\n",
    "import facts\n",
    "from facts.clean import clean_dataset\n",
    "from facts import valid_ifthens_with_coverage_correctness, rules2rulesbyif\n",
    "from facts.models import customLogisticRegression\n",
    "from facts.parameters import ParameterProxy\n",
    "from facts.formatting import recourse_report_reverse, print_recourse_report, print_recourse_report_cumulative,print_recourse_report_KStest_cumulative\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "from IPython.display import Markdown, display"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path\n",
    "\n",
    "random_seed = 131313 # for reproducibility\n",
    "precomputed_rules_file = Path(\"..\") / \"..\" / \"Pre-computed Results\" / \"Adult\" / \"rulesAdult_sex_atomic.data\"\n",
    "precomputed_rules_with_cumulative_file = Path(\"..\") / \"..\" / \"Pre-computed Results\" / \"Adult\" / \"rulesAdult_sex_cumulative.data\""
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Load Dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>Workclass</th>\n",
       "      <th>education-num</th>\n",
       "      <th>marital-status</th>\n",
       "      <th>occupation</th>\n",
       "      <th>relationship</th>\n",
       "      <th>race</th>\n",
       "      <th>sex</th>\n",
       "      <th>capital-gain</th>\n",
       "      <th>capital-loss</th>\n",
       "      <th>hours-per-week</th>\n",
       "      <th>native-country</th>\n",
       "      <th>income</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>(34.0, 41.0]</td>\n",
       "      <td>State-gov</td>\n",
       "      <td>13</td>\n",
       "      <td>Never-married</td>\n",
       "      <td>Adm-clerical</td>\n",
       "      <td>Not-in-family</td>\n",
       "      <td>White</td>\n",
       "      <td>Male</td>\n",
       "      <td>2174</td>\n",
       "      <td>0</td>\n",
       "      <td>FullTime</td>\n",
       "      <td>United-States</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>(41.0, 50.0]</td>\n",
       "      <td>Self-emp-not-inc</td>\n",
       "      <td>13</td>\n",
       "      <td>Married-civ-spouse</td>\n",
       "      <td>Exec-managerial</td>\n",
       "      <td>Married</td>\n",
       "      <td>White</td>\n",
       "      <td>Male</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>PartTime</td>\n",
       "      <td>United-States</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>(34.0, 41.0]</td>\n",
       "      <td>Private</td>\n",
       "      <td>9</td>\n",
       "      <td>Divorced</td>\n",
       "      <td>Handlers-cleaners</td>\n",
       "      <td>Not-in-family</td>\n",
       "      <td>White</td>\n",
       "      <td>Male</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>FullTime</td>\n",
       "      <td>United-States</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>(50.0, 90.0]</td>\n",
       "      <td>Private</td>\n",
       "      <td>7</td>\n",
       "      <td>Married-civ-spouse</td>\n",
       "      <td>Handlers-cleaners</td>\n",
       "      <td>Married</td>\n",
       "      <td>Black</td>\n",
       "      <td>Male</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>FullTime</td>\n",
       "      <td>United-States</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>(26.0, 34.0]</td>\n",
       "      <td>Private</td>\n",
       "      <td>13</td>\n",
       "      <td>Married-civ-spouse</td>\n",
       "      <td>Prof-specialty</td>\n",
       "      <td>Married</td>\n",
       "      <td>Black</td>\n",
       "      <td>Female</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>FullTime</td>\n",
       "      <td>Cuba</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            age          Workclass  education-num       marital-status  \\\n",
       "0  (34.0, 41.0]          State-gov             13        Never-married   \n",
       "1  (41.0, 50.0]   Self-emp-not-inc             13   Married-civ-spouse   \n",
       "2  (34.0, 41.0]            Private              9             Divorced   \n",
       "3  (50.0, 90.0]            Private              7   Married-civ-spouse   \n",
       "4  (26.0, 34.0]            Private             13   Married-civ-spouse   \n",
       "\n",
       "           occupation    relationship    race      sex  capital-gain  \\\n",
       "0        Adm-clerical   Not-in-family   White     Male          2174   \n",
       "1     Exec-managerial         Married   White     Male             0   \n",
       "2   Handlers-cleaners   Not-in-family   White     Male             0   \n",
       "3   Handlers-cleaners         Married   Black     Male             0   \n",
       "4      Prof-specialty         Married   Black   Female             0   \n",
       "\n",
       "   capital-loss hours-per-week  native-country  income  \n",
       "0             0       FullTime   United-States       0  \n",
       "1             0       PartTime   United-States       0  \n",
       "2             0       FullTime   United-States       0  \n",
       "3             0       FullTime   United-States       0  \n",
       "4             0       FullTime            Cuba       0  "
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "urlfile= \"https://raw.githubusercontent.com/columbia/fairtest/master/data/adult/adult.csv\"\n",
    "\n",
    "X = pd.read_csv(urlfile)\n",
    "df = clean_dataset(X, \"adult\")\n",
    "\n",
    "df.head()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Model training and test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "y = df['income']\n",
    "X = df.drop('income', axis=1)\n",
    "\n",
    "num_features = X._get_numeric_data().columns.to_list()\n",
    "cate_features = X.select_dtypes(include=['object','category']).columns.to_list()\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, train_size=0.7, random_state=random_seed, stratify=y)\n",
    "\n",
    "X_train = X_train.reset_index(drop=True)\n",
    "X_test = X_test.reset_index(drop=True)\n",
    "y_train = y_train.reset_index(drop=True)\n",
    "y_test = y_test.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Wall time: 3.62 s\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([0., 0., 1., 1., 1., 1., 0., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0.,\n",
       "       0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.,\n",
       "       0., 0., 0., 1., 0., 1., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0.,\n",
       "       1., 0., 1., 1., 0., 0., 0., 0., 0., 0., 1., 1., 0., 0., 1., 0., 0.,\n",
       "       1., 0., 1., 0., 0., 0., 1., 0., 1., 0., 1., 0., 1., 1., 0., 0., 0.,\n",
       "       0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 1., 1., 0., 0., 0.])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%time\n",
    "\n",
    "model = customLogisticRegression(max_iter = 1500)\n",
    "model.fit(X_train, y_train, cate_columns=cate_features, target_column='income')\n",
    "model.predict(X_test.iloc[:100, :])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "              precision    recall  f1-score   support\n",
      "\n",
      "           0       0.88      0.92      0.90     10205\n",
      "           1       0.73      0.61      0.66      3362\n",
      "\n",
      "    accuracy                           0.85     13567\n",
      "   macro avg       0.80      0.77      0.78     13567\n",
      "weighted avg       0.84      0.85      0.84     13567\n",
      "\n"
     ]
    }
   ],
   "source": [
    "positive_label = 1\n",
    "negative_label = 0\n",
    "preds_Xtest = model.predict(X_test)\n",
    "print(classification_report(y_test.map({negative_label: 0, positive_label: 1}), preds_Xtest))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 26424 characters]",
      "text/plain": [
       "<Figure size 640x480 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "conf_matrix = confusion_matrix(y_test, preds_Xtest)\n",
    "cm_disp = ConfusionMatrixDisplay(confusion_matrix=conf_matrix)\n",
    "cm_disp.plot()\n",
    "plt.show()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Main Contribution"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Find all valid if-thens with all respective coverages and atomic correctness, for all subgroups.\n",
    "\n",
    "**Caution!** This step takes time. Uncomment the following block if you wish to run."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# #Uncomment if you want to find new rules with different support\n",
    "\n",
    "# ifthens_coverage_correctness = valid_ifthens_with_coverage_correctness(\n",
    "#     X_test,\n",
    "#     model=model,\n",
    "#     sensitive_attribute='sex',\n",
    "#     freqitem_minsupp = 0.01,\n",
    "#     missing_subgroup_val=\"Unknown\",\n",
    "#     drop_infeasible = True,\n",
    "#     drop_above = True\n",
    "# )\n",
    "\n",
    "# print(f\"Number of if-thens: {len(ifthens_coverage_correctness)}\")\n",
    "# rules_by_if = rules2rulesbyif(ifthens_coverage_correctness)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from facts.utils import load_rules_by_if, save_rules_by_if\n",
    "\n",
    "## Use this for loading rules from disk\n",
    "rules_by_if = load_rules_by_if(precomputed_rules_file)\n",
    "\n",
    "## Use this for saving rules on disk\n",
    "#save_rules_by_if(precomputed_rules_file, rules_by_if)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "num_features = ['education-num', 'capital-gain', 'capital-loss']\n",
    "cate_features = ['age', 'Workclass', 'marital-status', 'occupation', 'relationship', 'race', 'sex', 'native-country']\n",
    "ord_features = ['hours-per-week']\n",
    "\n",
    "feature_weights = {\"race\" : 100 , \"sex\": 100, \"marital-status\": 5, \"relationship\":5, \"age\": 10, \"occupation\": 4, \"Workclass\": 2, \"native-country\": 4,\n",
    "                    \"hours-per-week\":2, \"capital-gain\": 1, \"capital-loss\":1, \"education-num\": 3}\n",
    "features_with_binary_cost = cate_features\n",
    "features_with_proportional_cost = num_features\n",
    "\n",
    "\n",
    "comparators = facts.feature_change_builder(\n",
    "    X_test,\n",
    "    num_cols=features_with_proportional_cost,\n",
    "    cate_cols=features_with_binary_cost,\n",
    "    ord_cols=ord_features,\n",
    "    feature_weights=feature_weights,\n",
    "    num_normalization=True,\n",
    "    feats_to_normalize = [\"capital-gain\", \"capital-loss\"]\n",
    ")\n",
    "params = ParameterProxy(featureChanges=comparators)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We continue with the rankings and selection of rules according to each of the proposed metrics."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Macro Viewpoint"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Equal Cost of Effectiveness (Macro)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-loss = 0, marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.28%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m84.97%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.44\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.77%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m51.30%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.44.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (26.0, 34.0], hours-per-week = OverTime, marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.37%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m68.48%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m59.78%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.03%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m53.49%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mage = (26.0, 34.0], hours-per-week = OverTime, marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.69%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m67.26%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m59.29%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.32%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m60.00%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mage = (26.0, 34.0], hours-per-week = FullTime, marital-status =  Never-married, race =  White, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.39%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m22.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.57%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m54.21%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m12.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], capital-loss = 0, marital-status =  Never-married, native-country =  United-States, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.52%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m50.00%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m56.86%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m50.00%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m22.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.17%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m53.33%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m57.78%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m12.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], capital-gain = 0, capital-loss = 0, marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.57%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m57.14%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m22.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.12%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m51.14%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m56.82%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m12.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "If \u001b[1mage = (34.0, 41.0], marital-status =  Never-married, race =  White, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.16%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m53.79%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.45%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m54.90%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mage = (34.0, 41.0], marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.46%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m50.91%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.93%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m53.28%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mage = (26.0, 34.0], capital-loss = 0, education-num = 10, marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.31%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 12\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m62.50%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m26.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.11%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m52.17%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 6.0.\u001b[39m\n",
      "If \u001b[1mcapital-loss = 0, marital-status =  Never-married, occupation =  Prof-specialty\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m3.76%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m59.13%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m5.44\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m7.24%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m53.16%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m9.45\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 4.02.\u001b[39m\n",
      "If \u001b[1meducation-num = 9, marital-status =  Married-civ-spouse, occupation =  Adm-clerical, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.02%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m70.59%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m55.88%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m7.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.30%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.00%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 3.\u001b[39m\n",
      "If \u001b[1meducation-num = 9, occupation =  Adm-clerical, race =  White, relationship =  Married\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.03%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m69.57%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m55.07%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m7.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.27%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.94%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 3.\u001b[39m\n"
     ]
    }
   ],
   "source": [
    "top_rules, subgroup_costs = facts.select_rules_subset(\n",
    "    rules_by_if,\n",
    "    metric=\"min-above-thr\",\n",
    "    sort_strategy=\"generic-sorting-ignore-exists-subgroup-empty\",\n",
    "    top_count=50,\n",
    "    filter_sequence = [\n",
    "        \"remove-contained\",\n",
    "        \"remove-below-thr\",        \n",
    "        \"remove-fair-rules\",\n",
    "        \"keep-only-min-change\"\n",
    "    ],\n",
    "    cor_threshold=0.5,\n",
    "    secondary_sorting_objectives=[\n",
    "        # \"min-group-cost\",\n",
    "        \"max-group-corr\"\n",
    "    ],\n",
    "    params=params\n",
    ")\n",
    "\n",
    "# cum_cors = facts.cum_corr_costs_all_minimal(top_rules, X_test, model, sensitive_attribute=\"sex\", params=params)\n",
    "cum_cors = dict()\n",
    "\n",
    "pop_sizes = {sg: ((X_test[\"sex\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"sex\"].unique()}\n",
    "print_recourse_report(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    subgroup_costs=subgroup_costs,\n",
    "    aggregate_cors_costs=cum_cors,\n",
    "    show_subgroup_costs=True\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Equal Choice for Recourse"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (26.0, 34.0], hours-per-week = FullTime, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.07%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m45.83%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.44%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m43.06%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m45.83%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.44%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m43.06%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m29.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m43.06%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m20.83%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.44%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m43.06%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m45.83%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m45.83%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m43.06%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-19.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.03%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 19.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.28%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m61.63%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m51.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m60.47%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m51.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m45.35%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m51.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m44.19%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m51.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m20.93%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m61.63%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m20.93%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m63.95%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m23.26%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m61.63%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m61.63%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m51.16%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-16.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.42%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 16.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, hours-per-week = FullTime, occupation =  Craft-repair\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m10.88%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m37.31%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m21.81%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m36.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m37.31%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m36.90%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m20.99%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.52%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.95%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.66%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m37.45%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m41.43%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m37.04%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m40.88%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-13.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.13%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 13.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], native-country =  United-States, occupation =  Machine-op-inspct\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.76%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.85%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m49.15%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m22.03%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m21.19%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.85%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m54.24%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.85%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m50.85%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-13.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.08%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 13.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, hours-per-week = FullTime, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m3.16%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.55%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m20.28%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m30.66%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.55%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m31.60%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m39.62%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m20.28%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m39.62%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.55%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m36.79%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m32.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m35.85%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-12.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.82%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 12.\u001b[39m\n",
      "If \u001b[1mage = (26.0, 34.0], education-num = 13, hours-per-week = FullTime\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.54%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m35.92%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m28.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m28.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 14\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m37.86%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 14\u001b[39m\u001b[0m with effectiveness \u001b[32m35.92%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31meducation-num = 14\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m35.92%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m29.13%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 14\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m24.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m35.92%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31meducation-num = 14\u001b[39m\u001b[0m with effectiveness \u001b[32m28.16%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 15\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m42.72%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-12.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.92%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 12.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, capital-loss = 0, marital-status =  Never-married, occupation =  Sales, race =  White, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.15%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m31.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m31.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m23.38%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m42.86%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m20.78%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m31.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Tech-support\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m20.78%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m40.26%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m53.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m31.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m53.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Adm-clerical\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m31.17%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-16.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.44%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m33.33%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m23.33%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m38.33%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m38.33%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-4.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 12.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, hours-per-week = FullTime, native-country =  United-States, occupation =  Adm-clerical, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.22%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m32.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m20.13%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m32.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m20.13%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m36.91%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m20.13%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m32.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m37.58%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-11.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m8.85%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 11.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, education-num = 13, native-country =  United-States, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.19%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m22.50%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 14\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 14\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31meducation-num = 14\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m22.50%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 15\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m30.00%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31meducation-num = 15\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m28.75%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 15\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m38.75%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m21.25%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-11.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.18%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 11.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, hours-per-week = FullTime, occupation =  Machine-op-inspct\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m6.11%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m29.34%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m28.61%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m29.34%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m28.85%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m34.47%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m34.72%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m29.34%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m32.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m29.34%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m31.78%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.97%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, hours-per-week = OverTime, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.22%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m34.90%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m34.90%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = FullTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = FullTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m34.23%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m26.17%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = FullTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m32.89%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.37%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (26.0, 34.0], occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.84%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m47.15%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m38.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m46.34%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m32.52%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m32.52%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m38.21%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.14%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m48.78%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.14%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m47.15%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.42%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (41.0, 50.0], occupation =  Machine-op-inspct\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.63%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.46%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m49.54%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.61%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.61%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m21.10%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m26.61%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m52.29%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m54.13%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m50.46%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m26.61%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.03%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, hours-per-week = FullTime, occupation =  Tech-support\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.15%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m22.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m20.78%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m22.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m22.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m22.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m27.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m22.08%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m25.97%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.71%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], hours-per-week = FullTime, marital-status =  Never-married, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.04%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m25.71%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m22.86%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-2.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.52%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m26.98%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m20.63%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m23.81%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m22.22%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m26.98%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m39.68%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m23.81%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m23.81%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m34.92%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m34.92%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m20.63%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-12.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mWorkclass =  Private, age = (26.0, 34.0], occupation =  Adm-clerical, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.03%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m40.58%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m37.68%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m40.58%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m30.43%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m30.43%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m37.68%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m21.74%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.03%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m24.64%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.03%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.37%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.\u001b[39m\n",
      "If \u001b[1mhours-per-week = FullTime, occupation =  Adm-clerical, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m3.24%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m38.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m37.33%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m24.88%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m24.88%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m38.25%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m37.33%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m26.27%\u001b[39m.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m21.20%\u001b[39m.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m-9.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m11.62%\u001b[39m covered out of 4184\n",
      "\t\t\u001b[31mNo recourses for this subgroup!\u001b[39m\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 9.\u001b[39m\n"
     ]
    }
   ],
   "source": [
    "top_rules, subgroup_costs = facts.select_rules_subset(\n",
    "    rules_by_if,\n",
    "    metric=\"num-above-thr\",\n",
    "    sort_strategy=\"generic-sorting-ignore-forall-subgroups-empty\",\n",
    "    top_count=50,\n",
    "    filter_sequence = [\n",
    "        \"remove-contained\",\n",
    "        \"remove-below-thr\",\n",
    "        # \"remove-fair-rules\"\n",
    "    ],\n",
    "    cor_threshold=0.2,\n",
    "    secondary_sorting_objectives=[\n",
    "        # \"min-group-cost\",\n",
    "        # \"max-group-corr\"\n",
    "    ],\n",
    "    params=params\n",
    ")\n",
    "\n",
    "# cum_cors = facts.cum_corr_costs_all_minimal(top_rules, X_test, model, sensitive_attribute=\"sex\", params=params)\n",
    "cum_cors = dict()\n",
    "\n",
    "pop_sizes = {sg: ((X_test[\"sex\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"sex\"].unique()}\n",
    "print_recourse_report(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    subgroup_costs=subgroup_costs,\n",
    "    aggregate_cors_costs=cum_cors,\n",
    "    show_subgroup_costs=True\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Micro viewpoint"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We start by computing the cumulative effectiveness of the actions for each subgroup and each value of the protected attribute.\n",
    "\n",
    "**Caution!** This step takes time. Uncomment the following block if you wish to run."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# rules_with_cumulative = facts.cum_corr_costs_all(rules_by_if, X_test, model, sensitive_attribute=\"sex\", params=params)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "## Use this for loading rules from disk\n",
    "rules_with_cumulative = load_rules_by_if(precomputed_rules_with_cumulative_file)\n",
    "\n",
    "## Use this for saving rules on disk\n",
    "# save_rules_by_if(precomputed_rules_with_cumulative_file, rules_with_cumulative)\n",
    "\n",
    "# facts.update_costs_cumulative(rules_with_cumulative, params)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Equal (Conditional) Mean Recourse"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mnative-country =  United-States, race =  Black, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.27%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 5.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m3.97%\u001b[39m and counterfactual cost = 105.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m38.33\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m4.02%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 5.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.72%\u001b[39m and counterfactual cost = 105.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m105.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 66.667.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29508 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], race =  Black\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.36%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m2.02%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m3.03%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m4.04%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m4.04%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m5.05%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m68.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.13%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m0.86%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.86%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.86%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.86%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m0.86%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 58.0.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23824 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (26.0, 34.0], race =  Black\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.02%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m3.40%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m3.40%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m4.76%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m4.76%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m7.48%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m64.55\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.46%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m2.65%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 54.545.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23796 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1moccupation =  Other-service, race =  Black\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.40%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m4.04%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m4.04%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Adm-clerical\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m4.04%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Transport-moving\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m4.04%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m5.05%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m5.05%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Protective-serv\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m5.05%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m7.07%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m7.07%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m9.09%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m59.56\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.73%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Adm-clerical\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Transport-moving\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Protective-serv\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.65%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m1.96%\u001b[39m and counterfactual cost = 104.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m104.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 44.444.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24548 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mhours-per-week = FullTime, native-country =  United-States, race =  Black, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.51%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m2.04%\u001b[39m and counterfactual cost = 5.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m2.04%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m2.04%\u001b[39m and counterfactual cost = 102.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m3.06%\u001b[39m and counterfactual cost = 105.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m3.06%\u001b[39m and counterfactual cost = 107.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m4.08%\u001b[39m and counterfactual cost = 107.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = PartTime\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m4.08%\u001b[39m and counterfactual cost = 109.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m5.10%\u001b[39m and counterfactual cost = 109.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m66.20\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.07%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 5.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mrace =  White\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 102.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 105.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 107.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 107.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = PartTime\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 109.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m1.43%\u001b[39m and counterfactual cost = 109.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m109.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 42.8.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26312 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mmarital-status =  Never-married, race =  Black, relationship =  Own-child\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.54%\u001b[39m covered out of 6557\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m1.75%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Not-in-family\u001b[39m\u001b[0m with effectiveness \u001b[32m1.75%\u001b[39m and counterfactual cost = 105.0.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Divorced\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Not-in-family\u001b[39m\u001b[0m with effectiveness \u001b[32m1.75%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m2.63%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m2.63%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m43.33\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.02%\u001b[39m covered out of 4184\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Not-in-family\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 105.0.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Divorced\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Not-in-family\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrace =  Asian-Pac-Islander\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m4.41%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrace =  White\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m4.41%\u001b[39m and counterfactual cost = 110.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m76.67\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 33.333.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27524 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "top_rules, subgroup_costs = facts.select_rules_subset_cumulative(\n",
    "    rules_with_cumulative,\n",
    "    metric=\"fairness-of-mean-recourse-conditional\",\n",
    "    sort_strategy=\"generic-sorting-ignore-exists-subgroup-empty\",\n",
    "    top_count=10,\n",
    "    filter_sequence = [\n",
    "        \"remove-contained\",\n",
    "        # \"remove-fair-rules\"\n",
    "    ],\n",
    "    params=params\n",
    ")\n",
    "\n",
    "pop_sizes = {sg: ((X_test[\"sex\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"sex\"].unique()}\n",
    "print_recourse_report_cumulative(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    subgroup_costs=subgroup_costs,\n",
    "    show_subgroup_costs=True,\n",
    "    show_then_costs=True,\n",
    "    show_cumulative_plots=True,\n",
    "    correctness_metric=False\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Equal Effectiveness"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], capital-loss = 0, native-country =  United-States, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.19%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m37.04%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m40.74%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m56.79%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m59.26%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m60.49%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.60\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.35%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.26%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m4.26%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.09\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.52.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26272 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], capital-gain = 0, native-country =  United-States, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.22%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m37.35%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m42.17%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.63%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m56.63%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m60.24%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.60\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.32%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m6.38%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.51%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.09\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.517.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25252 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], capital-loss = 0, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.16%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m40.26%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.16%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m61.04%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m62.34%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.62\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.06%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m5.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m5.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m10.81%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.11\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.515.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26564 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (26.0, 34.0], capital-gain = 0, capital-loss = 0, native-country =  United-States, occupation =  Exec-managerial, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.06%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m42.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.51\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.47%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.02\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.49.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23800 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-loss = 0, native-country =  United-States, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.42%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m35.23%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m39.77%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m39.77%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m39.77%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m39.77%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Adm-clerical\u001b[39m\u001b[0m with effectiveness \u001b[32m39.77%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m39.77%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.05%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m42.05%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m42.05%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m57.95%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m57.95%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.58\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.13%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Adm-clerical\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m4.55%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m6.82%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m6.82%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m6.82%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m9.09%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m9.09%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.09\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.489.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25260 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (41.0, 50.0], capital-loss = 0, occupation =  Machine-op-inspct\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.60%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m6.25%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m13.54%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m28.12%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m51.04%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m51.04%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m51.04%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.56\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.01%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m2.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m2.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.08\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.482.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25308 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-loss = 0, education-num = 9, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.39%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m15.53%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m15.53%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m27.95%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m32.92%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.24%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.93%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.51\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.51%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m2.33%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.65%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.05\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.463.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24752 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (26.0, 34.0], capital-gain = 0, capital-loss = 0, native-country =  United-States, occupation =  Exec-managerial, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.34%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m39.78%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.47\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.56%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 14.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.01\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.458.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22276 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-loss = 0, education-num = 10, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m3.19%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m\u001b[0m with effectiveness \u001b[32m15.62%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 12\u001b[39m\u001b[0m with effectiveness \u001b[32m29.69%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m29.69%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m29.69%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 11\u001b[39m\u001b[0m with effectiveness \u001b[32m29.69%\u001b[39m and counterfactual cost = 13.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 12\u001b[39m\u001b[0m with effectiveness \u001b[32m53.12%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.53\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.62%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m\u001b[0m with effectiveness \u001b[32m0.95%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 12\u001b[39m\u001b[0m with effectiveness \u001b[32m2.86%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m2.86%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m2.86%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 11\u001b[39m\u001b[0m with effectiveness \u001b[32m2.86%\u001b[39m and counterfactual cost = 13.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31meducation-num = 12\u001b[39m\u001b[0m with effectiveness \u001b[32m7.62%\u001b[39m and counterfactual cost = 16.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.08\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.455.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24076 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, education-num = 9, native-country =  United-States, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.39%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m14.47%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m14.47%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.42%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m31.45%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m40.88%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m49.69%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m49.69%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.50\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.46%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m2.33%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.65%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.65%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.05\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.45.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25356 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "top_rules, subgroup_costs = facts.select_rules_subset_cumulative(\n",
    "    rules_with_cumulative,\n",
    "    metric=\"total-correctness\",\n",
    "    sort_strategy=\"generic-sorting-ignore-forall-subgroups-empty\",\n",
    "    top_count=50,\n",
    "    filter_sequence = [\n",
    "        \"remove-contained\",\n",
    "        # \"remove-fair-rules\",\n",
    "        # \"keep-only-min-change\"\n",
    "    ],\n",
    "    params=params\n",
    ")\n",
    "\n",
    "pop_sizes = {sg: ((X_test[\"race\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"race\"].unique()}\n",
    "print_recourse_report_cumulative(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    subgroup_costs=subgroup_costs,\n",
    "    show_subgroup_costs=True,\n",
    "    show_then_costs=True,\n",
    "    show_cumulative_plots=True,\n",
    "    correctness_metric= True\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Equal Cost of Effectiveness (micro)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], marital-status =  Married-civ-spouse\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m7.64%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m11.02%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.65%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m38.48%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m12.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.95%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m20.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m38.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m2.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27764 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], relationship =  Married\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m7.60%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m11.09%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m24.80%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m38.71%\u001b[39m and counterfactual cost = 12.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m12.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.88%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m20.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m38.67%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m2.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27836 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (26.0, 34.0], marital-status =  Never-married, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m4.72%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m31.68%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m4.57%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m28.88%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m43.85%\u001b[39m and counterfactual cost = 20.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26144 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], marital-status =  Never-married, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.10%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m12.94%\u001b[39m and counterfactual cost = 5.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m12.94%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m12.94%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m17.06%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 15.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 15.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m21.18%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m24.12%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m30.59%\u001b[39m and counterfactual cost = 17.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m17.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.91%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m14.00%\u001b[39m and counterfactual cost = 5.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m14.00%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m14.00%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m20.00%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m\u001b[0m with effectiveness \u001b[32m31.00%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m7.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29976 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-loss = 0, marital-status =  Divorced, relationship =  Not-in-family\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.82%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m29.06%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m29.91%\u001b[39m and counterfactual cost = 20.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m34.19%\u001b[39m and counterfactual cost = 20.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m20.00\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m2.04%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mmarital-status =  Married-civ-spouse\u001b[39m, \u001b[31mrelationship =  Married\u001b[39m\u001b[0m with effectiveness \u001b[32m36.78%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m10.00\u001b[39m\n",
      "\t\u001b[35mBias against  Male due to Equal Effectiveness. Unfairness score = 10.0.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27416 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "top_rules, subgroup_costs = facts.select_rules_subset_cumulative(\n",
    "    rules_with_cumulative,\n",
    "    metric=\"min-above-corr\",\n",
    "    sort_strategy=\"generic-sorting-ignore-exists-subgroup-empty\",\n",
    "    top_count=50,\n",
    "    filter_sequence = [\n",
    "        \"remove-contained\",\n",
    "        \"remove-fair-rules\",\n",
    "        \"keep-cheap-rules-above-thr-cor\",\n",
    "        # \"keep-only-min-change\",\n",
    "        \n",
    "    ],\n",
    "    cor_threshold = 0.3,\n",
    "    params=params\n",
    ")\n",
    "\n",
    "pop_sizes = {sg: ((X_test[\"race\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"race\"].unique()}\n",
    "print_recourse_report_cumulative(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    subgroup_costs=subgroup_costs,\n",
    "    show_subgroup_costs=True,\n",
    "    show_then_costs=True,\n",
    "    show_cumulative_plots=True,\n",
    "    correctness_metric=False\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Equal Effectiveness Within Budget"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (34.0, 41.0], capital-loss = 0, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.16%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m40.26%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.16%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m59.74%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.60\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.06%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m5.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m5.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m8.11%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.08\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.516.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25108 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (26.0, 34.0], capital-gain = 0, capital-loss = 0, native-country =  United-States, occupation =  Exec-managerial, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.06%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m42.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m50.68%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.51\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.47%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.64%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.02\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.49.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22844 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (41.0, 50.0], capital-loss = 0, occupation =  Machine-op-inspct\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.60%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m6.25%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m13.54%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m28.12%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m51.04%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m51.04%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m51.04%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m56.25%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.56\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.01%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m2.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m2.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.08\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.482.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25396 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-loss = 0, education-num = 9, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.39%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m15.53%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m15.53%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m27.95%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m32.92%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.24%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m50.93%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.51\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.51%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m2.33%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.65%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.05\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.463.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24752 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (26.0, 34.0], capital-gain = 0, capital-loss = 0, native-country =  United-States, occupation =  Exec-managerial, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.34%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m39.78%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m47.31%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.47\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.56%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (34.0, 41.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.01\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.458.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22072 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, education-num = 9, native-country =  United-States, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m2.39%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m14.47%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m14.47%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m26.42%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m31.45%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m40.88%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m49.69%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m49.69%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.50\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.46%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m2.33%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m3.10%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.65%\u001b[39m and counterfactual cost = 9.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.65%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.05\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.45.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25356 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, education-num = 9, occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m3.13%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m12.98%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m12.98%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m23.56%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m31.73%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m42.31%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m49.52%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.50\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m3.80%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m2.82%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m4.23%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 10\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m4.23%\u001b[39m and counterfactual cost = 7.0.\n",
      "\t\tMake \u001b[1m\u001b[31meducation-num = 11\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m5.63%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.06\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.439.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24988 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (41.0, 50.0], capital-loss = 0, occupation =  Machine-op-inspct\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.67%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m5.94%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Adm-clerical\u001b[39m\u001b[0m with effectiveness \u001b[32m6.93%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m14.85%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m26.73%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m28.71%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m51.49%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.51\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.03%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Sales\u001b[39m\u001b[0m with effectiveness \u001b[32m1.96%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m1.96%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Adm-clerical\u001b[39m\u001b[0m with effectiveness \u001b[32m1.96%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m1.96%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m7.84%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m7.84%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.08\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.436.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24644 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, age = (50.0, 90.0], occupation =  Sales, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m1.06%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m28.99%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m28.99%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m33.33%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.93%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.45\u001b[39m\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m1.42%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m1.59%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\t\u001b[1mAggregate cost\u001b[0m of the above recourses = \u001b[35m0.02\u001b[39m\n",
      "\t\u001b[35mBias against  Female due to Equal Effectiveness. Unfairness score = 0.433.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 22984 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "top_rules, subgroup_costs = facts.select_rules_subset_cumulative(\n",
    "    rules_with_cumulative,\n",
    "    metric=\"max-upto-cost\",\n",
    "    sort_strategy=\"generic-sorting-ignore-exists-subgroup-empty\",\n",
    "    top_count=50,\n",
    "    filter_sequence = [\n",
    "        \"remove-contained\",\n",
    "        \"remove-fair-rules\",\n",
    "        \"remove-above-thr-cost\"\n",
    "        #\"remove-below-thr\",\n",
    "        #\"keep-only-min-change\",\n",
    "        \n",
    "    ],\n",
    "    cost_threshold = 10,\n",
    "    params=params\n",
    ")\n",
    "\n",
    "pop_sizes = {sg: ((X_test[\"race\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"race\"].unique()}\n",
    "print_recourse_report_cumulative(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    subgroup_costs=subgroup_costs,\n",
    "    show_subgroup_costs=True,\n",
    "    show_then_costs=True,\n",
    "    show_cumulative_plots=True,\n",
    "    correctness_metric = True\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Fair Effectiveness-Cost Trade-Off"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m94.15%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m38.94%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m39.87%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m51.62%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m53.23%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m83.51%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m83.51%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m83.51%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m83.51%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m93.84%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m13.06%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m13.82%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m24.60%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m27.22%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m74.25%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m74.25%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m74.25%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m74.25%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 13.24.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24876 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m96.82%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m39.39%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m40.31%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m52.04%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m53.68%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m83.77%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m96.42%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m13.80%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m14.65%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m25.57%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m28.27%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m74.82%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 13.15.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24020 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m85.16%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m40.96%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m52.92%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m54.59%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m84.27%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m84.27%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m84.27%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m84.27%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m85.81%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m14.25%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m25.14%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m27.79%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m74.66%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m74.66%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m74.66%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m74.66%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 12.99.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24616 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m87.60%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m41.36%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m53.30%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m54.99%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m84.50%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m88.26%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m15.16%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m26.16%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m28.91%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m75.26%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 12.87.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23724 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m76.01%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m43.12%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m55.04%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m56.71%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m85.43%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m85.43%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m85.43%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m85.43%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m69.40%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m16.09%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m27.87%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m30.60%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m76.41%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m76.41%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m76.41%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m76.41%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.64.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23980 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m82.04%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m40.88%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m41.82%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m53.54%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m55.17%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m84.47%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m84.47%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m84.47%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m84.47%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m74.50%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m15.01%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m15.77%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m27.42%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m30.12%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m75.98%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m75.98%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m75.98%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m75.98%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.61.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24436 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m70.41%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m36.86%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m47.63%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m49.31%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m80.73%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m80.73%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m80.73%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m80.73%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m74.67%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m11.60%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m20.88%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m23.22%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m71.66%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m71.66%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m71.66%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m71.66%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.55.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26324 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m72.26%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m37.36%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m48.16%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m49.85%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m81.03%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m76.93%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m12.48%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m21.88%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m24.29%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m72.23%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.51.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25580 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m78.22%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m43.50%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m55.40%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m57.09%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m85.64%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m71.54%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m17.14%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m28.95%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m31.77%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m76.97%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.5.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24008 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m84.37%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m41.30%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m42.23%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m53.95%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m55.60%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m84.71%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m76.74%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5013\u001b[39m\u001b[0m with effectiveness \u001b[32m15.89%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m16.76%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m28.45%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m31.24%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m76.51%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.49.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24340 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, capital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m62.89%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m38.14%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m49.10%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m50.83%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m81.61%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m81.61%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m81.61%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m81.61%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m67.64%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m11.91%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m21.33%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m23.75%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m71.98%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m71.98%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m71.98%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m71.98%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.38.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26448 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m64.55%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m38.61%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m49.57%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m51.31%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m81.86%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m69.79%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m12.90%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m22.37%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m24.88%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m72.59%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 11.3.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25560 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, capital-loss = 0, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m55.93%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m51.33%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m53.09%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m82.91%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m82.91%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m82.91%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m82.91%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m54.92%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m23.67%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m26.28%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m73.85%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m73.85%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m73.85%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m73.85%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 10.4.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28712 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m97.33%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m28.33%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m28.53%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m29.87%\u001b[39m and counterfactual cost = 0.51.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m97.43%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m8.65%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m8.75%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m9.20%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 10.31.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23972 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m57.43%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m51.79%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m53.56%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m83.16%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m56.84%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m24.82%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m27.48%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m74.41%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 10.3.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27308 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, capital-loss = 0, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m61.14%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m38.93%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m49.62%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m51.34%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m81.78%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m81.78%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m81.78%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m81.78%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m59.32%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m13.09%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m23.41%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m25.89%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m73.57%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m73.57%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m73.57%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m73.57%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 10.26.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24300 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m62.73%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m39.38%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m50.10%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m51.85%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m82.07%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m61.34%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 5178\u001b[39m\u001b[0m with effectiveness \u001b[32m14.19%\u001b[39m and counterfactual cost = 0.05.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m24.51%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m27.05%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m74.08%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 1.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 10.18.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24300 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m88.01%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m29.33%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m29.48%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m30.80%\u001b[39m and counterfactual cost = 0.51.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m89.15%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m8.91%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m9.02%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m9.49%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 10.15.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24072 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m78.55%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m31.06%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m31.23%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m32.60%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m32.60%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m72.14%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m10.16%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m10.29%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m10.80%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m10.80%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 9.51.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23524 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m84.79%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m29.89%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m30.10%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m31.45%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m31.45%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m31.45%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m77.46%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m9.98%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m10.10%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m10.61%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m10.61%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m10.61%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 9.43.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23672 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, hours-per-week = FullTime\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m47.99%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m52.40%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m53.86%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.75%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.55%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.55%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.55%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m45.06%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m26.74%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m30.30%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m84.62%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.30%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.30%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.30%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.81.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28672 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, hours-per-week = FullTime\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m49.41%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m53.02%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m54.46%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.05%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.05%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.05%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.81%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m46.43%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m27.95%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m31.53%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m85.01%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m85.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m85.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m85.01%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m85.01%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.59%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 99999\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 3.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m100.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.74.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 28012 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m72.71%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m26.32%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m26.44%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m27.66%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m27.66%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m27.66%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m27.66%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m27.66%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m27.66%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m77.27%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m7.44%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m7.54%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m7.96%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m7.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m7.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m7.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m7.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m7.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.65.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 29912 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m64.91%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m27.47%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m27.58%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m28.74%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m28.74%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m28.74%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m28.74%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m28.74%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m28.74%\u001b[39m and counterfactual cost = 2.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m70.00%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m7.63%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m7.74%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m8.16%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m8.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m8.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m8.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m8.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m8.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.57.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23396 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, hours-per-week = FullTime, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m42.77%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m54.00%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m55.56%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.45%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.45%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.45%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m91.45%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m40.51%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m27.88%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m31.62%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.00%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.56%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.56%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.56%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.56%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.49.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 27700 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, hours-per-week = FullTime, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m44.01%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m54.53%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m56.07%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.89%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.89%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.89%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.89%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.89%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.68%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m91.68%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m41.81%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m29.13%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m32.91%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m86.35%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.35%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.35%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.35%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m86.35%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.82%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.82%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.38.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26964 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (50.0, 90.0], capital-gain = 0, capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m17.54%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m72.29%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m97.87%\u001b[39m and counterfactual cost = 0.15.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m15.83%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m31.73%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m90.51%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.32.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25104 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-loss = 0, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m57.74%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m29.39%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m29.51%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m30.70%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m57.01%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m8.61%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m8.74%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m9.16%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.24.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23916 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (50.0, 90.0], capital-gain = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m18.00%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m72.61%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m97.93%\u001b[39m and counterfactual cost = 0.15.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m16.21%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m33.13%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m90.85%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.19.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25116 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, hours-per-week = FullTime\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m49.53%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m27.47%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m27.56%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m27.56%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m27.56%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m36.30%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m36.81%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m36.81%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m46.67%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m8.76%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m8.87%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m8.87%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m8.87%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m13.06%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m13.50%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m13.50%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.14.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25580 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-loss = 0, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m63.13%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m28.03%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m28.17%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m61.63%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m8.56%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m8.68%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 0.51.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m9.12%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 8.08.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23888 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, hours-per-week = FullTime, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m44.19%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m28.70%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m28.73%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m28.73%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m28.73%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m37.65%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m38.15%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m38.15%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m41.98%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m9.14%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m9.26%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m9.26%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m9.26%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m13.71%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m14.13%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m14.13%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.94.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25376 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, capital-loss = 0, hours-per-week = FullTime\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m38.08%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m50.36%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m54.42%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 6.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m36.47%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m25.78%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m33.31%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m87.00%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.56.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25364 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, hours-per-week = FullTime\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m39.07%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m51.05%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m55.19%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m89.38%\u001b[39m and counterfactual cost = 6.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m37.60%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m26.96%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m34.37%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.52.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25344 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, hours-per-week = FullTime, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m40.59%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m54.28%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m55.74%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.61%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.41%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.41%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.41%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m91.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m91.41%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m34.52%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m30.39%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m33.95%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.32%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.66%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.66%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.66%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.66%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m90.66%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.31.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25960 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, hours-per-week = FullTime, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m38.30%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m30.76%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m30.80%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m30.80%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m30.80%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m40.43%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m40.43%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m40.43%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m32.72%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m10.70%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m10.85%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m10.85%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m10.85%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m15.94%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m15.94%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m15.94%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.29.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26156 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, hours-per-week = FullTime, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m41.90%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m29.26%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m29.37%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m38.75%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m39.14%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m39.14%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m39.14%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m39.14%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m35.80%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m10.36%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m10.50%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m10.50%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m10.50%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m15.36%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m15.86%\u001b[39m and counterfactual cost = 2.51.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m15.86%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m15.86%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m15.86%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.28.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26764 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, capital-loss = 0, hours-per-week = FullTime, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m33.45%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m52.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m56.00%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.15%\u001b[39m and counterfactual cost = 6.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m32.43%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m27.01%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m34.83%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m88.39%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.26.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25452 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, hours-per-week = FullTime, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m41.75%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m54.90%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m56.35%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.86%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.86%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.86%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.86%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.86%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.63%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m91.63%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m91.63%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m91.63%\u001b[39m and counterfactual cost = 100.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m35.65%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m31.67%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m35.21%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m87.64%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.64%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.64%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.64%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m87.64%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.89%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.89%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Asian-Pac-Islander\u001b[39m\u001b[0m with effectiveness \u001b[32m90.89%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\tMake \u001b[1m\u001b[31mrace =  Black\u001b[39m\u001b[0m with effectiveness \u001b[32m90.89%\u001b[39m and counterfactual cost = 100.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.22.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25844 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, capital-loss = 0, hours-per-week = FullTime, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m37.07%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m56.24%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m57.76%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.61%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m92.42%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m92.42%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m92.42%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m31.56%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m31.65%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m35.41%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1887\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 0.48.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.81%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.93%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m91.93%\u001b[39m and counterfactual cost = 2.49.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m91.93%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.19.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26532 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mWorkclass =  Private, capital-gain = 0, hours-per-week = FullTime, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m34.30%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m52.69%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m56.68%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m90.41%\u001b[39m and counterfactual cost = 6.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m33.49%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m\u001b[0m with effectiveness \u001b[32m28.22%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m35.85%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Local-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  State-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Federal-gov\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-not-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\tMake \u001b[1m\u001b[31mWorkclass =  Self-emp-inc\u001b[39m, \u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m88.67%\u001b[39m and counterfactual cost = 6.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.19.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25424 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-gain = 0, hours-per-week = FullTime, native-country =  United-States, race =  White\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m38.15%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m56.77%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m58.29%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m88.83%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.83%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.83%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.83%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m88.83%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m92.61%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m92.61%\u001b[39m and counterfactual cost = 4.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m32.62%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m32.94%\u001b[39m and counterfactual cost = 0.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m36.68%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = MidTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 2.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7298\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 2.07.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m89.10%\u001b[39m and counterfactual cost = 2.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m, \u001b[31mhours-per-week = OverTime\u001b[39m\u001b[0m with effectiveness \u001b[32m92.13%\u001b[39m and counterfactual cost = 2.15.\n",
      "\t\tMake \u001b[1m\u001b[31mhours-per-week = BrainDrain\u001b[39m\u001b[0m with effectiveness \u001b[32m92.13%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 7.08.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 26124 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m17.14%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m3.34%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m6.16%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m49.32%\u001b[39m and counterfactual cost = 10.49.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m16.65%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.22%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m2.91%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m17.13%\u001b[39m and counterfactual cost = 10.49.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.67.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23112 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (41.0, 50.0], capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m14.52%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m49.60%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m49.60%\u001b[39m and counterfactual cost = 10.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m15.11%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m15.63%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m15.63%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.62.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25084 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m15.55%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m3.36%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m6.26%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m50.05%\u001b[39m and counterfactual cost = 10.49.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m15.35%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m1.32%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m2.97%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m17.00%\u001b[39m and counterfactual cost = 10.49.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.56.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23068 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (41.0, 50.0], capital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m13.32%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m50.88%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m50.88%\u001b[39m and counterfactual cost = 10.0.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m13.83%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m16.53%\u001b[39m and counterfactual cost = 0.49.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m16.53%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.41.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 25092 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mcapital-loss = 0, occupation =  Sales\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m10.03%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Adm-clerical\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Protective-serv\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Transport-moving\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m5.07%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m12.90%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m16.13%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m42.40%\u001b[39m and counterfactual cost = 4.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m44.85%\u001b[39m and counterfactual cost = 4.51.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m13.21%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Craft-repair\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Adm-clerical\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Protective-serv\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Transport-moving\u001b[39m\u001b[0m with effectiveness \u001b[32m0.00%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Tech-support\u001b[39m\u001b[0m with effectiveness \u001b[32m0.18%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m0.55%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m1.65%\u001b[39m and counterfactual cost = 4.0.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1902\u001b[39m, \u001b[31moccupation =  Prof-specialty\u001b[39m\u001b[0m with effectiveness \u001b[32m7.54%\u001b[39m and counterfactual cost = 4.49.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-loss = 1977\u001b[39m, \u001b[31moccupation =  Exec-managerial\u001b[39m\u001b[0m with effectiveness \u001b[32m8.64%\u001b[39m and counterfactual cost = 4.51.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.28.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 23404 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-gain = 0, capital-loss = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m16.54%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m68.68%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.51%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m98.51%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m98.51%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m98.51%\u001b[39m and counterfactual cost = 10.07.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m98.51%\u001b[39m and counterfactual cost = 10.08.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.51%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.69%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m98.69%\u001b[39m and counterfactual cost = 10.49.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m15.68%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m37.68%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m92.21%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m92.21%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m92.21%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m92.21%\u001b[39m and counterfactual cost = 10.07.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m92.21%\u001b[39m and counterfactual cost = 10.08.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m93.16%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m94.91%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m94.91%\u001b[39m and counterfactual cost = 10.49.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.27.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24808 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-gain = 0, capital-loss = 0, native-country =  United-States\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m15.03%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m69.75%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.66%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m98.66%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m98.66%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m98.66%\u001b[39m and counterfactual cost = 10.08.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.66%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.85%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m98.85%\u001b[39m and counterfactual cost = 10.49.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m14.43%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m37.52%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m92.77%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m92.77%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m92.77%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m92.77%\u001b[39m and counterfactual cost = 10.08.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m93.46%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m95.01%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-loss = 1902\u001b[39m\u001b[0m with effectiveness \u001b[32m95.01%\u001b[39m and counterfactual cost = 10.49.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.24.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24852 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "If \u001b[1mage = (34.0, 41.0], capital-gain = 0\u001b[0m:\n",
      "\tProtected Subgroup '\u001b[1m Male\u001b[0m', \u001b[34m17.05%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m68.96%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.47%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m98.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m98.47%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m98.47%\u001b[39m and counterfactual cost = 10.07.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m98.47%\u001b[39m and counterfactual cost = 10.08.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.47%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m98.64%\u001b[39m and counterfactual cost = 10.15.\n",
      "\tProtected Subgroup '\u001b[1m Female\u001b[0m', \u001b[34m15.97%\u001b[39m covered (protected subgroup population size not given)\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m38.76%\u001b[39m and counterfactual cost = 0.08.\n",
      "\t\tMake \u001b[1m\u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m92.40%\u001b[39m and counterfactual cost = 0.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m92.40%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m\u001b[0m with effectiveness \u001b[32m92.40%\u001b[39m and counterfactual cost = 10.0.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 7298\u001b[39m\u001b[0m with effectiveness \u001b[32m92.40%\u001b[39m and counterfactual cost = 10.07.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 7688\u001b[39m\u001b[0m with effectiveness \u001b[32m92.40%\u001b[39m and counterfactual cost = 10.08.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (50.0, 90.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m93.33%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\tMake \u001b[1m\u001b[31mage = (41.0, 50.0]\u001b[39m, \u001b[31mcapital-gain = 15024\u001b[39m\u001b[0m with effectiveness \u001b[32m95.04%\u001b[39m and counterfactual cost = 10.15.\n",
      "\t\u001b[35m Unfairness based on the Fair Effectiveness-Cost Trade-Off = 6.18.\u001b[39m\n",
      "\t\u001b[36mCumulative effectiveness plot for the above recourses:\u001b[39m\n"
     ]
    },
    {
     "data": {
      "image/png": "[encoded data, 24484 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "affected_pop_sizes = {sg: ((X_test[\"sex\"] == sg) & (preds_Xtest == 0)).sum() for sg in X_test[\"sex\"].unique()}\n",
    "\n",
    "top_rules,unfairness = facts.select_rules_subset_KStest(\n",
    "    rules_with_cumulative,\n",
    "    affected_pop_sizes,\n",
    "    top_count=50\n",
    ")\n",
    "\n",
    "print_recourse_report_KStest_cumulative(\n",
    "    top_rules,\n",
    "    population_sizes=pop_sizes,\n",
    "    unfairness = unfairness,\n",
    "    show_then_costs=True,\n",
    "    show_cumulative_plots=True\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "vscode": {
   "interpreter": {
    "hash": "362842c44ed7d38e9c92d488ead4445e1c745f35479a5810177dacafb6456c39"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
