From 1a4358736c59d678104695ffa43827dccf490f51 Mon Sep 17 00:00:00 2001 From: Martin Hirzel Date: Tue, 25 Jul 2023 21:13:59 -0400 Subject: [PATCH] trying to fix CI failures Signed-off-by: Martin Hirzel --- examples/demo_fairness_datasets.ipynb | 1039 +++++++++++++------------ lale/lib/aif360/datasets.py | 2 +- 2 files changed, 526 insertions(+), 515 deletions(-) diff --git a/examples/demo_fairness_datasets.ipynb b/examples/demo_fairness_datasets.ipynb index 875143d1f..07b757eaa 100644 --- a/examples/demo_fairness_datasets.ipynb +++ b/examples/demo_fairness_datasets.ipynb @@ -10,12 +10,12 @@ "name": "stderr", "output_type": "stream", "text": [ - "2023-07-25 13:20:39.756232: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA\n", + "2023-07-25 21:06:56.832840: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA\n", "To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.\n", - "2023-07-25 13:20:39.969258: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", - "2023-07-25 13:20:40.754285: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\n", - "2023-07-25 13:20:40.754444: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\n", - "2023-07-25 13:20:40.754453: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n" + "2023-07-25 21:06:57.309322: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n", + "2023-07-25 21:06:58.528974: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory\n", + "2023-07-25 21:06:58.529108: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory\n", + "2023-07-25 21:06:58.529118: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.\n" ] } ], @@ -36,7 +36,9 @@ "cell_type": "code", "execution_count": 2, "id": "3b0ee9f1", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "dataset_names = {\n", @@ -61,10 +63,19 @@ " \"titanic\": \"titanic\",\n", " \"us_crime\": \"us_crime\",\n", "}\n", - "datasets = {\n", - " name: getattr(lale.lib.aif360.datasets, f\"fetch_{long_name}_df\")()\n", - " for name, long_name in dataset_names.items()\n", - "}" + "\n", + "def try_fetch(dataset_name):\n", + " long_name = dataset_names[dataset_name]\n", + " fetcher_function = getattr(lale.lib.aif360.datasets, f\"fetch_{long_name}_df\")\n", + " try:\n", + " X, y, fairness_info = fetcher_function()\n", + " except SystemExit:\n", + " print(f\"skipping {dataset_name} because it is not downloaded\")\n", + " return None\n", + " return X, y, fairness_info\n", + "\n", + "datasets = {name: try_fetch(name) for name in dataset_names}\n", + "datasets = {name: data for name, data in datasets.items() if data is not None}" ] }, { @@ -143,7 +154,7 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", " \n", @@ -162,290 +173,290 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
 
0ricciOpenML1185TrueFalse2promotionPromotionrace 0ricciOpenML1185TrueFalse2promotionPromotionrace
1taeOpenML1515FalseFalse3class_attribute3whether_of_not_the_ta_is_a_native_english_speaker 1taeOpenML1515FalseFalse3class_attribute3whether_of_not_the_ta_is_a_native_english_speaker
2heart_diseaseOpenML30313FalseFalse2target1age 2heart_diseaseOpenML30313FalseFalse2target1age
3student_mathOpenML39532TrueFalse2g3_ge_101sexage3student_mathOpenML39532TrueFalse2g3_ge_101sexage
4student_porOpenML64932TrueFalse2g3_ge_101sexage4student_porOpenML64932TrueFalse2g3_ge_101sexage
5creditgOpenML1,00020TrueFalse2classgoodpersonal_statusage5creditgOpenML1,00020TrueFalse2classgoodpersonal_statusage
6titanicOpenML1,30913TrueTrue2survived1sex 6titanicOpenML1,30913TrueTrue2survived1sex
7us_crimeOpenML1,994102TrueFalse2crimegt70pct0blackgt6pct 7us_crimeOpenML1,994102TrueFalse2crimegt70pct0blackgt6pct
8compas_violentProPublica4,02051TrueTrue2two_year_recid0sexrace8compas_violentProPublica4,02051TrueTrue2two_year_recid0sexrace
9nlsyOpenML4,90815TrueFalse2income96gt171agegender9nlsyOpenML4,90815TrueFalse2income96gt171agegender
10compasProPublica6,17251TrueTrue2two_year_recid0sexrace10compasProPublica6,17251TrueTrue2two_year_recid0sexrace
11speeddatingOpenML8,378122TrueTrue2match1sameraceimportance_same_race11speeddatingOpenML8,378122TrueTrue2match1sameraceimportance_same_race
12nurseryOpenML12,9608TrueFalse5classspec_priorparents 12nurseryOpenML12,9608TrueFalse5classspec_priorparents
13meps19AHRQ16,5781,825TrueFalse2UTILIZATION1RACE 13meps19AHRQ16,5781,825TrueFalse2UTILIZATION1RACE
14meps21AHRQ17,0521,936TrueFalse2UTILIZATION1RACE 14meps21AHRQ17,0521,936TrueFalse2UTILIZATION1RACE
15meps20AHRQ18,8491,825TrueFalse2UTILIZATION1RACE 15meps20AHRQ18,8491,825TrueFalse2UTILIZATION1RACE
16law_schoolOpenML20,80011TrueFalse2ugpagt3TRUErace1 16law_schoolOpenML20,80011TrueFalse2ugpagt3TRUErace1
17default_creditOpenML30,00024FalseFalse2default.payment.next.month0sex 17default_creditOpenML30,00024FalseFalse2default.payment.next.month0sex
18bankOpenML45,21116TrueFalse2class1age 18bankOpenML45,21116TrueFalse2class1age
19adultOpenML48,84214TrueTrue2class>50Kracesex19adultOpenML48,84214TrueTrue2class>50Kracesex
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 5, @@ -646,7 +657,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -656,7 +667,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 2.2 seconds\n", + " elapsed time 2.1 seconds\n", "get_metrics(tae), 151 rows\n" ] }, @@ -706,7 +717,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -716,7 +727,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 2.1 seconds\n", + " elapsed time 1.7 seconds\n", "get_metrics(heart_disease), 303 rows\n" ] }, @@ -766,7 +777,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -776,7 +787,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 1.8 seconds\n", + " elapsed time 1.6 seconds\n", "get_metrics(student_math), 395 rows\n" ] }, @@ -873,7 +884,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -883,7 +894,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 2.1 seconds\n", + " elapsed time 2.2 seconds\n", "get_metrics(student_por), 649 rows\n" ] }, @@ -980,7 +991,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -990,7 +1001,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 2.0 seconds\n", + " elapsed time 2.4 seconds\n", "get_metrics(creditg), 1,000 rows\n" ] }, @@ -1087,7 +1098,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1097,7 +1108,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 2.2 seconds\n", + " elapsed time 2.5 seconds\n", "get_metrics(titanic), 1,309 rows\n" ] }, @@ -1226,7 +1237,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1236,7 +1247,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 2.2 seconds\n", + " elapsed time 2.4 seconds\n", "get_metrics(us_crime), 1,994 rows\n" ] }, @@ -1350,7 +1361,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1396,7 +1407,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 4.1 seconds\n", + " elapsed time 4.4 seconds\n", "get_metrics(compas_violent), 4,020 rows\n" ] }, @@ -1542,7 +1553,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1608,7 +1619,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 5.2 seconds\n", + " elapsed time 5.5 seconds\n", "get_metrics(nlsy), 4,908 rows\n" ] }, @@ -1705,7 +1716,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1715,7 +1726,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 3.9 seconds\n", + " elapsed time 4.2 seconds\n", "get_metrics(compas), 6,172 rows\n" ] }, @@ -1861,7 +1872,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -1927,7 +1938,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 8.2 seconds\n", + " elapsed time 12.7 seconds\n", "get_metrics(speeddating), 8,378 rows\n" ] }, @@ -2073,7 +2084,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2119,7 +2130,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 9.6 seconds\n", + " elapsed time 10.6 seconds\n", "get_metrics(nursery), 12,960 rows\n" ] }, @@ -2185,7 +2196,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2203,7 +2214,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 11.9 seconds\n", + " elapsed time 17.8 seconds\n", "get_metrics(meps19), 16,578 rows\n" ] }, @@ -2317,7 +2328,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2403,7 +2414,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 41.0 seconds\n", + " elapsed time 43.6 seconds\n", "get_metrics(meps21), 17,052 rows\n" ] }, @@ -2517,7 +2528,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2595,7 +2606,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 40.4 seconds\n", + " elapsed time 44.7 seconds\n", "get_metrics(meps20), 18,849 rows\n" ] }, @@ -2709,7 +2720,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2785,7 +2796,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 41.3 seconds\n", + " elapsed time 45.0 seconds\n", "get_metrics(law_school), 20,800 rows\n" ] }, @@ -2882,7 +2893,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2892,7 +2903,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 4.1 seconds\n", + " elapsed time 3.8 seconds\n", "get_metrics(default_credit), 30,000 rows\n" ] }, @@ -2942,7 +2953,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -2952,7 +2963,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 42.0 seconds\n", + " elapsed time 46.7 seconds\n", "get_metrics(bank), 45,211 rows\n" ] }, @@ -3049,7 +3060,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -3059,7 +3070,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 28.6 seconds\n", + " elapsed time 24.4 seconds\n", "get_metrics(adult), 48,842 rows\n" ] }, @@ -3188,7 +3199,7 @@ "\n" ], "text/plain": [ - "" + "" ] }, "metadata": {}, @@ -3198,7 +3209,7 @@ "name": "stdout", "output_type": "stream", "text": [ - " elapsed time 25.6 seconds\n" + " elapsed time 31.6 seconds\n" ] } ], @@ -3219,7 +3230,7 @@ "text/html": [ "\n", - "\n", + "
\n", " \n", " \n", " \n", @@ -3237,270 +3248,270 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
 
0ricci11890.3%49.8%50.3%4.7%2.5%5.0%98.3%2.1%0ricci11890.3%49.8%50.3%4.7%2.5%5.0%98.3%2.1%
1tae15152.5%44.9%38.1%17.5%1.9%15.2%65.0%24.9%1tae15152.5%44.9%38.1%17.5%1.9%15.2%65.0%24.9%
2heart_disease30383.6%58.9%58.6%16.6%-20.2%17.3%80.9%5.9%2heart_disease30383.6%58.9%58.6%16.6%-20.2%17.3%80.9%5.9%
3student_math39569.5%89.4%85.0%9.4%8.9%5.8%93.3%3.0%3student_math39569.5%89.4%85.0%9.4%8.9%5.8%93.3%3.0%
4student_por64918.2%85.8%86.5%4.0%-2.9%4.9%83.1%7.7%4student_por64918.2%85.8%86.5%4.0%-2.9%4.9%83.1%7.7%
5creditg1,00042.9%74.8%71.7%13.3%-17.1%14.1%68.6%3.5%5creditg1,00042.9%74.8%71.7%13.3%-17.1%14.1%68.6%3.5%
6titanic1,30961.8%26.3%25.3%1.6%-0.3%5.1%94.4%2.0%6titanic1,30961.8%26.3%25.3%1.6%-0.3%5.1%94.4%2.0%
7us_crime1,9946.5%88.8%92.6%1.9%-3.6%1.5%65.9%5.4%7us_crime1,9946.5%88.8%92.6%1.9%-3.6%1.5%65.9%5.4%
8compas_violent4,02019.4%85.2%84.8%0.8%-0.7%0.3%99.2%0.5%8compas_violent4,02019.4%85.2%84.8%0.8%-0.7%0.3%99.2%0.5%
9nlsy4,90860.7%66.8%59.6%4.0%-24.3%5.7%64.7%2.2%9nlsy4,90860.7%66.8%59.6%4.0%-24.3%5.7%64.7%2.2%
10compas6,17283.5%74.7%71.8%0.7%-3.9%0.7%98.1%0.3%10compas6,17283.5%74.7%71.8%0.7%-3.9%0.7%98.1%0.3%
11speeddating8,37819.7%85.3%85.4%3.2%0.0%0.0%100.0%0.0%11speeddating8,37819.7%85.3%85.4%3.2%0.0%0.0%100.0%0.0%
12nursery12,96045.4%46.1%59.5%21.8%13.2%26.5%78.7%12.7%12nursery12,96045.4%46.1%59.5%21.8%13.2%26.5%78.7%12.7%
13meps1916,57821.1%49.6%48.9%1.1%-2.7%2.1%94.4%0.5%13meps1916,57821.1%49.6%48.9%1.1%-2.7%2.1%94.4%0.5%
14meps2117,05220.6%46.2%44.4%1.6%-5.6%3.0%94.9%0.5%14meps2117,05220.6%46.2%44.4%1.6%-5.6%3.0%94.9%0.5%
15meps2018,84920.9%49.3%49.2%0.9%-2.6%1.5%94.3%0.4%15meps2018,84920.9%49.3%49.2%0.9%-2.6%1.5%94.3%0.4%
16law_school20,80047.5%70.4%70.4%0.0%0.0%0.0%100.0%0.0%16law_school20,80047.5%70.4%70.4%0.0%0.0%0.0%100.0%0.0%
17default_credit30,00028.4%95.7%89.7%10.8%9.6%11.6%54.4%4.6%17default_credit30,00028.4%95.7%89.7%10.8%9.6%11.6%54.4%4.6%
18bank45,21113.2%84.0%92.1%2.7%6.6%9.8%48.3%7.6%18bank45,21113.2%84.0%92.1%2.7%6.6%9.8%48.3%7.6%
19adult48,84231.5%22.7%17.8%3.0%-18.4%5.4%79.8%0.6%19adult48,84231.5%22.7%17.8%3.0%-18.4%5.4%79.8%0.6%
\n" ], "text/plain": [ - "" + "" ] }, "execution_count": 9, diff --git a/lale/lib/aif360/datasets.py b/lale/lib/aif360/datasets.py index 291a9b003..b34efbacf 100644 --- a/lale/lib/aif360/datasets.py +++ b/lale/lib/aif360/datasets.py @@ -17,7 +17,7 @@ See the notebook `demo_fairness_datasets`_ for an example for using the functions, along with some tables and figures about them. Some of the fetcher methods have a `preprocess` argument that - defaults to False. +defaults to False. The notebook does not use that argument, instead demonstrating how to do any required preprocessing in the context of a Lale pipeline. Most of the datasets are from `OpenML`_, and most of the datasets