From f7b62f4e4cfe15db9b313f492de4ed1a893ade6b Mon Sep 17 00:00:00 2001 From: mmaurostoffel <166130318+mmaurostoffel@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:56:10 +0200 Subject: [PATCH] =?UTF-8?q?Ortsvergleich=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Data_Analysis.py | 15 ++++++ __pycache__/Data_Analysis.cpython-312.pyc | Bin 6464 -> 6992 bytes accuracyPerLocation.py | 58 ++++++++++++++++++++++ results/accuracyOverview.csv | 5 ++ 4 files changed, 78 insertions(+) create mode 100644 accuracyPerLocation.py create mode 100644 results/accuracyOverview.csv diff --git a/Data_Analysis.py b/Data_Analysis.py index b4c9303..8aab477 100644 --- a/Data_Analysis.py +++ b/Data_Analysis.py @@ -4,6 +4,17 @@ from datetime import datetime, timedelta import numpy as np +def getPropertyDataFromDB(): + db = MySQLdb.connect(host="localhost",user="root",passwd="admin",db="consultancy") + cur = db.cursor() + + cur.execute("SELECT id, seed_id, check_data " + "FROM properties ") + propData = cur.fetchall() + db.close() + + return propData + def getDataFromDB(propId): ''' Function to get data from MySQL database filter with the given propId @@ -147,6 +158,7 @@ def getAccuracy(df, baseLine, compLine): def getMeanAccuracy(accList): ''' + Get the mean Accuracy of the entire timedelay of one property :param accList: List of accuracy Values of a comparison :return: Average of the accuracy values while ignoring the '-1' values ''' @@ -155,3 +167,6 @@ def getMeanAccuracy(accList): row = [x for x in row if x != -1] out.append(np.average(row)) return out + + + diff --git a/__pycache__/Data_Analysis.cpython-312.pyc b/__pycache__/Data_Analysis.cpython-312.pyc index 94d8777fe696cbd506be0839cff9e72bf594cae1..aec3414c74b5d8ba0246f52e4c8aa4eb56e152c6 100644 GIT binary patch delta 1178 zcmZ8g-D?zA6rVe@yR);Oam^;Xi63K9O{OU^wL~ZtF^&1q>^7PRf;7a*?p2rU>@H^} zn2}(TR#1^5;r;=wh)5qx=u1Hqp)V~IeJL{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