Commit 0307b858 authored by markus's avatar markus
Browse files

now executes all 25 lps

parent b44c638e
......@@ -26,7 +26,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
......@@ -129,18 +129,9 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"output_type": "error",
"ename": "SyntaxError",
"evalue": "invalid syntax (<ipython-input-5-3445bfdcc8e9>, line 3)",
"traceback": [
"\u001b[0;36m File \u001b[0;32m\"<ipython-input-5-3445bfdcc8e9>\"\u001b[0;36m, line \u001b[0;32m3\u001b[0m\n\u001b[0;31m pos, neg = extract_resources(lps 2)\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"outputs": [],
"source": [
"def execute_on_lp(lps : Graph, embeddings : list, lp : int):\n",
" # Combine positive and negative results\n",
......@@ -167,23 +158,363 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Execution for LP 1: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 107\n",
"True negatives: 10714\n",
"False positives: 11551\n",
"False negatives: 0\n",
"Accuracy: 0.4836849633470409\n",
"Precision: 0.009178246697546749\n",
"Recall: 1.0\n",
"F1-Score: 0.018189545261368466\n",
"\n",
"\n",
"\n",
"Execution for LP 2: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 76\n",
"True negatives: 10646\n",
"False positives: 11579\n",
"False negatives: 71\n",
"Accuracy: 0.4792597890219918\n",
"Precision: 0.006520806520806521\n",
"Recall: 0.5170068027210885\n",
"F1-Score: 0.012879173021521775\n",
"\n",
"\n",
"\n",
"Execution for LP 3: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 504\n",
"True negatives: 10708\n",
"False positives: 11154\n",
"False negatives: 6\n",
"Accuracy: 0.5011621669944574\n",
"Precision: 0.04323211528564076\n",
"Recall: 0.9882352941176471\n",
"F1-Score: 0.08284023668639054\n",
"\n",
"\n",
"\n",
"Execution for LP 4: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 25\n",
"True negatives: 10712\n",
"False positives: 11635\n",
"False negatives: 0\n",
"Accuracy: 0.47993026998033256\n",
"Precision: 0.002144082332761578\n",
"Recall: 1.0\n",
"F1-Score: 0.004278990158322636\n",
"\n",
"\n",
"\n",
"Execution for LP 5: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 767\n",
"True negatives: 10703\n",
"False positives: 10889\n",
"False negatives: 13\n",
"Accuracy: 0.5126944394779188\n",
"Precision: 0.06580301990391214\n",
"Recall: 0.9833333333333333\n",
"F1-Score: 0.1233515599871341\n",
"\n",
"\n",
"\n",
"Execution for LP 6: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 101\n",
"True negatives: 10639\n",
"False positives: 11560\n",
"False negatives: 72\n",
"Accuracy: 0.4800643661720007\n",
"Precision: 0.008661349798473545\n",
"Recall: 0.5838150289017341\n",
"F1-Score: 0.01706946087544364\n",
"\n",
"\n",
"\n",
"Execution for LP 7: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 214\n",
"True negatives: 10715\n",
"False positives: 11443\n",
"False negatives: 0\n",
"Accuracy: 0.48851242624709457\n",
"Precision: 0.018358068113579824\n",
"Recall: 1.0\n",
"F1-Score: 0.036054249852581925\n",
"\n",
"\n",
"\n",
"Execution for LP 8: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 96\n",
"True negatives: 10718\n",
"False positives: 11558\n",
"False negatives: 0\n",
"Accuracy: 0.4833720722331486\n",
"Precision: 0.008237515016303414\n",
"Recall: 1.0\n",
"F1-Score: 0.016340425531914893\n",
"\n",
"\n",
"\n",
"Execution for LP 9: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 97\n",
"True negatives: 10711\n",
"False positives: 11564\n",
"False negatives: 0\n",
"Accuracy: 0.4831038798498123\n",
"Precision: 0.008318326044078552\n",
"Recall: 1.0\n",
"F1-Score: 0.016499404660656577\n",
"\n",
"\n",
"\n",
"Execution for LP 10: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 312\n",
"True negatives: 10703\n",
"False positives: 11350\n",
"False negatives: 7\n",
"Accuracy: 0.49235651707491507\n",
"Precision: 0.026753558566283656\n",
"Recall: 0.9780564263322884\n",
"F1-Score: 0.052082463901176865\n",
"\n",
"\n",
"\n",
"Execution for LP 11: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 44\n",
"True negatives: 11616\n",
"False positives: 10669\n",
"False negatives: 43\n",
"Accuracy: 0.5211871982835687\n",
"Precision: 0.004107159525809764\n",
"Recall: 0.5057471264367817\n",
"F1-Score: 0.008148148148148147\n",
"\n",
"\n",
"\n",
"Execution for LP 12: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 126\n",
"True negatives: 10710\n",
"False positives: 11535\n",
"False negatives: 1\n",
"Accuracy: 0.48435544430538174\n",
"Precision: 0.010805248263442244\n",
"Recall: 0.9921259842519685\n",
"F1-Score: 0.02137767220902613\n",
"\n",
"\n",
"\n",
"Execution for LP 13: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 18\n",
"True negatives: 10716\n",
"False positives: 11638\n",
"False negatives: 0\n",
"Accuracy: 0.4797961737886644\n",
"Precision: 0.0015442690459849004\n",
"Recall: 1.0\n",
"F1-Score: 0.0030837759122837073\n",
"\n",
"\n",
"\n",
"Execution for LP 14: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 44\n",
"True negatives: 10716\n",
"False positives: 11610\n",
"False negatives: 2\n",
"Accuracy: 0.4809583407831218\n",
"Precision: 0.003775527715805732\n",
"Recall: 0.9565217391304348\n",
"F1-Score: 0.007521367521367521\n",
"\n",
"\n",
"\n",
"Execution for LP 15: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 338\n",
"True negatives: 11634\n",
"False positives: 10383\n",
"False negatives: 17\n",
"Accuracy: 0.5351332022170571\n",
"Precision: 0.03152690980319\n",
"Recall: 0.952112676056338\n",
"F1-Score: 0.06103286384976526\n",
"\n",
"\n",
"\n",
"Execution for LP 16: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 15\n",
"True negatives: 10713\n",
"False positives: 11644\n",
"False negatives: 0\n",
"Accuracy: 0.4795279814053281\n",
"Precision: 0.0012865597392572262\n",
"Recall: 1.0\n",
"F1-Score: 0.002569813260236423\n",
"\n",
"\n",
"\n",
"Execution for LP 17: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 1936\n",
"True negatives: 9131\n",
"False positives: 9715\n",
"False negatives: 1590\n",
"Accuracy: 0.4946808510638298\n",
"Precision: 0.1661659943352502\n",
"Recall: 0.5490640952921158\n",
"F1-Score: 0.2551228833102721\n",
"\n",
"\n",
"\n",
"Execution for LP 18: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 321\n",
"True negatives: 10716\n",
"False positives: 11335\n",
"False negatives: 0\n",
"Accuracy: 0.4933398891471482\n",
"Precision: 0.02753946465339739\n",
"Recall: 1.0\n",
"F1-Score: 0.05360273858228271\n",
"\n",
"\n",
"\n",
"Execution for LP 19: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 42\n",
"True negatives: 10710\n",
"False positives: 11620\n",
"False negatives: 0\n",
"Accuracy: 0.4806007509386733\n",
"Precision: 0.003601440576230492\n",
"Recall: 1.0\n",
"F1-Score: 0.007177033492822966\n",
"\n",
"\n",
"\n",
"Execution for LP 20: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 632\n",
"True negatives: 10708\n",
"False positives: 11023\n",
"False negatives: 9\n",
"Accuracy: 0.5068836045056321\n",
"Precision: 0.05422565422565422\n",
"Recall: 0.9859594383775351\n",
"F1-Score: 0.10279765777488614\n",
"\n",
"\n",
"\n",
"Execution for LP 21: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 26\n",
"True negatives: 10695\n",
"False positives: 11628\n",
"False negatives: 23\n",
"Accuracy: 0.4792150902914357\n",
"Precision: 0.0022309936502488414\n",
"Recall: 0.5306122448979592\n",
"F1-Score: 0.004443305135435358\n",
"\n",
"\n",
"\n",
"Execution for LP 22: \n",
"Positive cluster label: 1\n",
"Negative cluster label: 0\n",
"True positives: 18\n",
"True negatives: 10718\n",
"False positives: 11636\n",
"False negatives: 0\n",
"Accuracy: 0.4798855712497765\n",
"Precision: 0.0015445340655568904\n",
"Recall: 1.0\n",
"F1-Score: 0.0030843043180260456\n",
"\n",
"\n",
"\n",
"Execution for LP 23: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 39\n",
"True negatives: 10715\n",
"False positives: 11618\n",
"False negatives: 0\n",
"Accuracy: 0.48069014839978547\n",
"Precision: 0.003345629235652398\n",
"Recall: 1.0\n",
"F1-Score: 0.006668946648426813\n",
"\n",
"\n",
"\n",
"Execution for LP 24: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 56\n",
"True negatives: 10715\n",
"False positives: 11601\n",
"False negatives: 0\n",
"Accuracy: 0.4814500268192383\n",
"Precision: 0.004803980440936776\n",
"Recall: 1.0\n",
"F1-Score: 0.009562025100315888\n",
"\n",
"\n",
"\n",
"Execution for LP 25: \n",
"Positive cluster label: 0\n",
"Negative cluster label: 1\n",
"True positives: 82\n",
"True negatives: 10992\n",
"False positives: 11233\n",
"False negatives: 65\n",
"Accuracy: 0.49499374217772213\n",
"Precision: 0.007247017233760495\n",
"Recall: 0.5578231292517006\n",
"F1-Score: 0.014308148665154423\n"
"True positives: 87\n",
"True negatives: 10715\n",
"False positives: 11570\n",
"False negatives: 0\n",
"Accuracy: 0.4828356874664759\n",
"Precision: 0.007463326756455349\n",
"Recall: 1.0\n",
"F1-Score: 0.014816076294277928\n",
"\n",
"\n",
"\n"
]
}
],
......@@ -193,7 +524,7 @@
"for i in range(1, 26):\n",
" print(\"Execution for LP \" + str(i) + \": \")\n",
" execute_on_lp(learning_problems, embeddings, i)\n",
" print(\"\\n\\n\")"
" print(\"\\n\")"
]
}
]
......
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