Commit b2c597f3 authored by Uwe Köckemann's avatar Uwe Köckemann
Browse files

Cleared notebook outputs

parent 0b99ff5e
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"scrolled": true
},
......@@ -49,40 +49,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Label: \"violentPerPop\"\n",
"Attributes: [\n",
" (\"pctHousOccup\" org.aiddl.term)\n",
" (\"pct12-21\" org.aiddl.term)\n",
" (\"pct16-24\" org.aiddl.term)\n",
" (\"pctWorkMom-6\" org.aiddl.term)\n",
" (\"pctLargHous\" org.aiddl.term)\n",
" (\"ownHousQrange\" org.aiddl.term)\n",
" (\"pct12-29\" org.aiddl.term)\n",
" (\"persPerOccupHous\" org.aiddl.term)\n",
" (\"persPerFam\" org.aiddl.term)\n",
" (\"rentQrange\" org.aiddl.term)\n",
" (\"pctLargHousFam\" org.aiddl.term)\n",
" (\"persPerOwnOccup\" org.aiddl.term)\n",
" (\"whitePerCap\" org.aiddl.term)\n",
" (\"pctEmployProfServ\" org.aiddl.term)\n",
" (\"pctFgnImmig-3\" org.aiddl.term)\n",
" (\"race\" org.aiddl.term)\n",
" (\"violentPerPop\" org.aiddl.term)\n",
" ]\n",
"\n",
"Data (first row): [0.9764342597107102 0.13917940466613032 0.10512037978975924 0.7447776280323449 0.0486362142622412 0.31993957703927495 0.21429739898576802 0.2271062271062273 0.25106382978723407 0.20921544209215442 0.05278678855794751 0.31046931407942224 0.2408048532587981 0.35711430855315746 0.14779575007928955 0.0 0.03989083587243134]\n"
]
}
],
"outputs": [],
"source": [
"C = Container()\n",
"F = get_default_function_registry(C)\n",
......@@ -111,21 +82,11 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DIDI (pre-learning): 0.18046885714845506\n",
"DIDI (post-learning): 0.22802470095999794\n",
"MSE (test data): 0.007566857207861887\n"
]
}
],
"outputs": [],
"source": [
"didi_init = didi_r(np.array(x_test), np.array(y_test), [len(x[0])-1])\n",
"\n",
......@@ -172,7 +133,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -205,7 +166,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -229,7 +190,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -245,39 +206,9 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Initializing model\n",
"('didi', 'violentPerPop', [15], 0.01)\n",
"Constraint added: ('didi', 'violentPerPop', [15], 0.01)\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n"
]
}
],
"outputs": [],
"source": [
"y_k = f_MT(mt_data)"
]
......
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"scrolled": true
},
......@@ -53,40 +53,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Label: \"violentPerPop\"\n",
"Attributes: [\n",
" (\"pctHousOccup\" org.aiddl.term)\n",
" (\"pct12-21\" org.aiddl.term)\n",
" (\"pct16-24\" org.aiddl.term)\n",
" (\"pctWorkMom-6\" org.aiddl.term)\n",
" (\"pctLargHous\" org.aiddl.term)\n",
" (\"ownHousQrange\" org.aiddl.term)\n",
" (\"pct12-29\" org.aiddl.term)\n",
" (\"persPerOccupHous\" org.aiddl.term)\n",
" (\"persPerFam\" org.aiddl.term)\n",
" (\"rentQrange\" org.aiddl.term)\n",
" (\"pctLargHousFam\" org.aiddl.term)\n",
" (\"persPerOwnOccup\" org.aiddl.term)\n",
" (\"whitePerCap\" org.aiddl.term)\n",
" (\"pctEmployProfServ\" org.aiddl.term)\n",
" (\"pctFgnImmig-3\" org.aiddl.term)\n",
" (\"race\" org.aiddl.term)\n",
" (\"violentPerPop\" org.aiddl.term)\n",
" ]\n",
"\n",
"Data (first row): [0.9764342597107102 0.13917940466613032 0.10512037978975924 0.7447776280323449 0.0486362142622412 0.31993957703927495 0.21429739898576802 0.2271062271062273 0.25106382978723407 0.20921544209215442 0.05278678855794751 0.31046931407942224 0.2408048532587981 0.35711430855315746 0.14779575007928955 0.0 0.03989083587243134]\n"
]
}
],
"outputs": [],
"source": [
"C = Container()\n",
"F = get_default_function_registry(C)\n",
......@@ -120,7 +91,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -151,7 +122,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -176,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -200,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -228,93 +199,11 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Initializing model\n",
"Constraint added: ('didi', 'violentPerPop', [15], 0.01)\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Experiment 1 --- {?q:0.01 ?a:0.1 ?b:0.1}\n",
"\tMSE: [0.0075649999432197785, 0.008530069799771141, 0.008548233691510771, 0.008498669905116565, 0.008427397889178548, 0.008569340042030802, 0.008551833063050502, 0.008455712109618931, 0.027763400410349862, 0.02768183036604746]\n",
"\tDIDI: [0.2280682687346325, 0.05094295119441482, 0.053259187314152995, 0.05559364454608068, 0.05781008494006891, 0.04394251566917626, 0.038524931348284386, 0.05436155866195111, 0.000661859070061047, 9.355019065670928e-05]\n",
"Initializing model\n",
"Constraint added: ('didi', 'violentPerPop', [15], 0.1)\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Experiment 2 --- {?q:0.1 ?a:0.1 ?b:0.1}\n",
"\tMSE: [0.007588003613171019, 0.007906674299587958, 0.007900176954594803, 0.007995230779557692, 0.007946528856603964, 0.007866819668687346, 0.008047197687253146, 0.007617327913203704, 0.027824013460150242, 0.02767700693493508]\n",
"\tDIDI: [0.22794109178949823, 0.13473696305239571, 0.1316695576569858, 0.12707686632408643, 0.12917608258843566, 0.12482873204718598, 0.1300031341470565, 0.10499027144651946, 0.0006531467950797183, 3.5610045082483e-05]\n",
"Initializing model\n",
"Constraint added: ('didi', 'violentPerPop', [15], 1.0)\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Constraint satisfaction: True\n",
"Solving\n",
"Experiment 3 --- {?q:1.0 ?a:0.1 ?b:0.1}\n",
"\tMSE: [0.0075753209453758115, 0.007575360995763902, 0.007562777782553964, 0.007578252200353943, 0.0075788085477299545, 0.007586122957775647, 0.007586557677977061, 0.0075963029735288115, 0.027681729171628547, 0.027675562114745537]\n",
"\tDIDI: [0.22807828809058894, 0.22794580558788946, 0.2281122734614801, 0.22807129080185268, 0.22810444746015368, 0.22793314661911016, 0.22788304311607913, 0.22785403737016305, 2.5798229396370304e-14, 2.745704556514911e-06]\n"
]
}
],
"outputs": [],
"source": [
"results = []\n",
"\n",
......
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"scrolled": true
},
......@@ -54,71 +54,11 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Label: \"income\"\n",
"Attributes: [\n",
" (\"age\" org.aiddl.term)\n",
" (\"fnlwgt\" org.aiddl.term)\n",
" (\"education-num\" org.aiddl.term)\n",
" (\"capital-gain\" org.aiddl.term)\n",
" (\"capital-loss\" org.aiddl.term)\n",
" (\"hours-per-week\" org.aiddl.term)\n",
" (\"workclass_Federal-gov\" org.aiddl.term)\n",
" (\"workclass_Local-gov\" org.aiddl.term)\n",
" (\"workclass_Private\" org.aiddl.term)\n",
" (\"workclass_Self-emp-inc\" org.aiddl.term)\n",
" (\"workclass_Self-emp-not-inc\" org.aiddl.term)\n",
" (\"workclass_State-gov\" org.aiddl.term)\n",
" (\"workclass_Without-pay\" org.aiddl.term)\n",
" (\"marital-status_Divorced\" org.aiddl.term)\n",
" (\"marital-status_Married-AF-spouse\" org.aiddl.term)\n",
" (\"marital-status_Married-civ-spouse\" org.aiddl.term)\n",
" (\"marital-status_Married-spouse-absent\" org.aiddl.term)\n",
" (\"marital-status_Never-married\" org.aiddl.term)\n",
" (\"marital-status_Separated\" org.aiddl.term)\n",
" (\"marital-status_Widowed\" org.aiddl.term)\n",
" (\"occupation_Adm-clerical\" org.aiddl.term)\n",
" (\"occupation_Armed-Forces\" org.aiddl.term)\n",
" (\"occupation_Craft-repair\" org.aiddl.term)\n",
" (\"occupation_Exec-managerial\" org.aiddl.term)\n",
" (\"occupation_Farming-fishing\" org.aiddl.term)\n",
" (\"occupation_Handlers-cleaners\" org.aiddl.term)\n",
" (\"occupation_Machine-op-inspct\" org.aiddl.term)\n",
" (\"occupation_Other-service\" org.aiddl.term)\n",
" (\"occupation_Priv-house-serv\" org.aiddl.term)\n",
" (\"occupation_Prof-specialty\" org.aiddl.term)\n",
" (\"occupation_Protective-serv\" org.aiddl.term)\n",
" (\"occupation_Sales\" org.aiddl.term)\n",
" (\"occupation_Tech-support\" org.aiddl.term)\n",
" (\"occupation_Transport-moving\" org.aiddl.term)\n",
" (\"relationship_Husband\" org.aiddl.term)\n",
" (\"relationship_Not-in-family\" org.aiddl.term)\n",
" (\"relationship_Other-relative\" org.aiddl.term)\n",
" (\"relationship_Own-child\" org.aiddl.term)\n",
" (\"relationship_Unmarried\" org.aiddl.term)\n",
" (\"relationship_Wife\" org.aiddl.term)\n",
" (\"sex_Female\" org.aiddl.term)\n",
" (\"sex_Male\" org.aiddl.term)\n",
" (\"race_Amer-Indian-Eskimo\" org.aiddl.term)\n",
" (\"race_Asian-Pac-Islander\" org.aiddl.term)\n",
" (\"race_Black\" org.aiddl.term)\n",
" (\"race_Other\" org.aiddl.term)\n",
" (\"race_White\" org.aiddl.term)\n",
" (\"income\" org.aiddl.term)\n",
" ]\n",
"\n",
"Data (first row): [0.4931506849315069 0.104543595947006 0.26666666666666666 0.0 0.0 0.7040816326530611 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0]\n"
]
}
],
"outputs": [],
"source": [
"C = Container()\n",
"F = get_default_function_registry(C)\n",
......@@ -147,21 +87,11 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"DIDI (pre-learning): 1.3178840744255598\n",
"DIDI (post-learning): 1.1725631788433029\n",
"ACC (test data): 0.8562904027846843\n"
]
}
],
"outputs": [],
"source": [
"didi_init = didi_c(np.array(x), np.array(y), [45, 44, 43, 42, 41])\n",
"\n",
......@@ -208,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -241,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -265,7 +195,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......@@ -281,39 +211,11 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Constraint added: FairnessConstraint: didi <= 0.01\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n",
"Constraint satisfaction: False\n",
"Solving\n"
]
}
],
"outputs": [],
"source": [
"y_k = f_MT(mt_data)"
]
......@@ -329,27 +231,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"n ACC DIDI\n",
"0 0.8553 1.2083\n",
"1 0.8533 0.9210\n",
"2 0.8553 0.9807\n",
"3 0.8545 0.9143\n",
"4 0.8568 0.9761\n",
"5 0.8540 0.9939\n",
"6 0.8555 0.9858\n",
"7 0.8523 1.0195\n",
"8 0.8566 0.9139\n",
"9 0.8553 1.0617\n"
]
}
],
"outputs": [],
"source": [
"i = 0\n",
"\n",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment