From 5edd79ecedb457f2d0cd2e3718e7c4e91cbba653 Mon Sep 17 00:00:00 2001 From: "enzo.vandepoele" Date: Mon, 23 May 2022 09:51:38 +0200 Subject: [PATCH 1/6] =?UTF-8?q?D=C3=A9pot=20:=20Tk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Test_tk.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Test_tk.py diff --git a/Test_tk.py b/Test_tk.py new file mode 100644 index 0000000..abb872c --- /dev/null +++ b/Test_tk.py @@ -0,0 +1,51 @@ +from tkinter import * + +fenetre = Tk() + +canvas1 = Canvas(fenetre) + +label1 = Label(fenetre, text="Choisissez le nombre de voisins (k) :",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value1 = IntVar() +entree1 = Entry(fenetre, textvariable=value1, bg = "gray") + +label2 = Label(fenetre, text="Veuillez entrez la date (format 'aaaa-mm-jj'):",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value2 = IntVar() +entree2 = Entry(fenetre, textvariable=value2) + +label3 = Label(fenetre, text="Veuillez entrez la température moyenne (en °C):",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value3 = IntVar() +entree3 = Entry(fenetre, textvariable=value3,) + +label4 = Label(fenetre, text="Veuillez entrez la température de référence (en °C) :",font = + ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") +value4 = IntVar() +entree4 = Entry(fenetre, textvariable=value4) + +label1.grid(pady=10) +entree1.grid() + +label2.grid(pady=10) +entree2.grid() + +label3.grid(pady=10) +entree3.grid() + +label4.grid(pady=10) +entree4.grid() + +label9= Label(fenetre, text="Conso", bg="#7a817f") + +bouton1 = Button(canvas1, text="Tester",height=2,width=10 ,bg="#4e93de", font = + ('calibri', 12, 'bold', 'underline')).grid() + +canvas1.grid(pady = 15) +label9.grid() + +fenetre.title("IHM KNN") +fenetre.iconbitmap('icon.ico') +fenetre['bg'] = '#fd9f9f' +fenetre.geometry('300x350') +fenetre.mainloop() \ No newline at end of file From cc46513aff4d8f5b6be52ac474d636be0793ffb5 Mon Sep 17 00:00:00 2001 From: "enzo.vandepoele" Date: Mon, 30 May 2022 08:12:20 +0200 Subject: [PATCH 2/6] =?UTF-8?q?D=C3=A9pot=20:=20Modif=20KNN=5FMark1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KNN_Mark1.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/KNN_Mark1.py b/KNN_Mark1.py index a1e7a47..9d8aee3 100644 --- a/KNN_Mark1.py +++ b/KNN_Mark1.py @@ -37,14 +37,12 @@ def kPlusProches(k, donnees_point, temp_num_jour): une liste du jeu de données et la conso électrique. Renvoie une liste triée en fonction de la distance dont les éléments sont des tuples.""" voisins = [] - if k > len(temp_num_jour[0]): - k = len(temp_num_jour[0]) - energy = temp_num_jour.pop() - energy.sort - for i in range(len(temp_num_jour[0])): + if k > len(temp_num_jour): + k = len(temp_num_jour) + for i in range(len(temp_num_jour)): d = distance(temp_num_jour[i],donnees_point) voisins.append((d, i)) - voisins.sort() + voisins.sort() return [voisins[i][1] for i in range(k)] def numeroJour(date): @@ -125,25 +123,26 @@ def distance(temp_jour, donneespoint): dist = ((x1-x2)**2)+((y1-y2)**2)+((z1-z2)**2) return dist -def PuissanceMoyenne(lst,distance): +def PuissanceMoyenne(lst, distance): """Calcule la moyenne de distances entre les points """ lecture("pic-journalier-consommation.csv") moy = sum() / len() + return conso def recup1(): - k = value1.get() + k = 5 return k def recup2(): - date = '2016-08-24' + date = 2016 return date def recup3(): - temp_moy = value3.get() + temp_moy = 34 return temp_moy def recup4(): - temp_ref = value4.get() + temp_ref = 41 return temp_ref #def calc_conso(): From 81af21871aca98be5780d8661120fe816bbbb848 Mon Sep 17 00:00:00 2001 From: VANDEPOELE Enzo Date: Mon, 30 May 2022 08:30:54 +0200 Subject: [PATCH 3/6] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Test=5Ftk.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Test_tk.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Test_tk.py b/Test_tk.py index abb872c..2049e46 100644 --- a/Test_tk.py +++ b/Test_tk.py @@ -12,17 +12,17 @@ entree1 = Entry(fenetre, textvariable=value1, bg = "gray") label2 = Label(fenetre, text="Veuillez entrez la date (format 'aaaa-mm-jj'):",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value2 = IntVar() -entree2 = Entry(fenetre, textvariable=value2) +entree2 = Entry(fenetre, textvariable=value2, bg = "gray") label3 = Label(fenetre, text="Veuillez entrez la température moyenne (en °C):",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value3 = IntVar() -entree3 = Entry(fenetre, textvariable=value3,) +entree3 = Entry(fenetre, textvariable=value3, bg = "gray") label4 = Label(fenetre, text="Veuillez entrez la température de référence (en °C) :",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value4 = IntVar() -entree4 = Entry(fenetre, textvariable=value4) +entree4 = Entry(fenetre, textvariable=value4, bg = "gray") label1.grid(pady=10) entree1.grid() @@ -38,7 +38,7 @@ entree4.grid() label9= Label(fenetre, text="Conso", bg="#7a817f") -bouton1 = Button(canvas1, text="Tester",height=2,width=10 ,bg="#4e93de", font = +bouton1 = Button(canvas1, text="Tester", command=fenetre.destroy,height=2,width=10 ,bg="#4e93de", font = ('calibri', 12, 'bold', 'underline')).grid() canvas1.grid(pady = 15) @@ -48,4 +48,4 @@ fenetre.title("IHM KNN") fenetre.iconbitmap('icon.ico') fenetre['bg'] = '#fd9f9f' fenetre.geometry('300x350') -fenetre.mainloop() \ No newline at end of file +fenetre.mainloop() From 96cf4be49a4e8909599d4ab9b0125454d946c625 Mon Sep 17 00:00:00 2001 From: "gabrie.chataigner" Date: Mon, 30 May 2022 08:30:55 +0200 Subject: [PATCH 4/6] knn --- KNN_Mark1.py | 49 ++++++++++++++++++++++++++++++------------------- Thumbs.db | Bin 0 -> 8192 bytes 2 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 Thumbs.db diff --git a/KNN_Mark1.py b/KNN_Mark1.py index 9d8aee3..71eeb4e 100644 --- a/KNN_Mark1.py +++ b/KNN_Mark1.py @@ -5,7 +5,7 @@ def lancer(k, date, temp_moy, temp_ref, temp_num_jour): donnees_point = [date, temp_moy, temp_ref] print(k) print(donnees_point) - print(temp_num_jour) + #print(temp_num_jour) kPlusProches(k, donnees_point, temp_num_jour) #estBissextile(an) @@ -32,18 +32,30 @@ def estBissextile(an): else: return False -def kPlusProches(k, donnees_point, temp_num_jour): +def kPlusProches(k,donnees_point,temp_num_jour): """Fonction qui prend en paramètre un tuple correspondant au point à vérifier, une liste du jeu de données et la conso électrique. Renvoie une liste triée en fonction de la distance dont les éléments sont des tuples.""" - voisins = [] + if k > len(temp_num_jour): k = len(temp_num_jour) + voisin=[] + for j in range(k): + voisin.append([None]) + for i in range(len(temp_num_jour)): - d = distance(temp_num_jour[i],donnees_point) - voisins.append((d, i)) - voisins.sort() - return [voisins[i][1] for i in range(k)] + MN = distance(temp_num_jour[i],donnees_point) + for l in range(k): + if voisin[l][1] == None or MNKmm{h*u82efXAO@{C5i;0Per7 z`M>AGzuqtYp7_5N^VcKyw_^Vh{{Qd!{}Gt}yUl+N0tByVU|x#@?tkX z=VbqPmVY$@|J(S7E4`OSMIu6a?H{VFj0EIWoBk=lKLD~qKs=TG;{%Q5$<>mALh*f=r`WJ?y7g;OzQmcnRTUJZqykzq8r_F4h>>#)3$exF7qz&S1ccKc-qe+ z@kkSj$%xh^BSBY-PL6JC8`z16^uuK=r42u~+pbL-TaU7WwWfw{osWgSFCQG!f>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ch>qb)JmUIBZaW$;+{p65G42l?p%=`EdY!OxeC@k1Yxcdh|43bL zm(|6tnLf}5QDRX&L#)xcb#pvzAsLUDn%BssYOT<1*|~FHXUX6K$WpJ7`$5C9?AUtx zpmA=G?%MH{HeqK@f2C!1d;+(sU`S&Gz9@{IM_z|N=y~E4DzTWn?%-a-GoRf?zFoH7 zMGS_53k-GSib|G>SHCpc`_DOBNB6a_2aHj7;YUXEEHDmu8HhyXXdz9-<7(dr&RSjy zz{#Br+Lec6Z)q!JRz$hzhi=6n1zyZusNV$Oh4QHEo!7bPM9(^)z8BkQ=S@!n*eh7j zLBi0*^{w~%%Z5&!L!zOy>(N@tK8_~atSMkz@M4(y|?tampPHBg# Date: Mon, 30 May 2022 08:31:35 +0200 Subject: [PATCH 5/6] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'Test=5Ftk.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Test_tk.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Test_tk.py b/Test_tk.py index 2049e46..27deefe 100644 --- a/Test_tk.py +++ b/Test_tk.py @@ -7,22 +7,22 @@ canvas1 = Canvas(fenetre) label1 = Label(fenetre, text="Choisissez le nombre de voisins (k) :",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value1 = IntVar() -entree1 = Entry(fenetre, textvariable=value1, bg = "gray") +entree1 = Entry(fenetre, textvariable=value1) label2 = Label(fenetre, text="Veuillez entrez la date (format 'aaaa-mm-jj'):",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value2 = IntVar() -entree2 = Entry(fenetre, textvariable=value2, bg = "gray") +entree2 = Entry(fenetre, textvariable=value2) label3 = Label(fenetre, text="Veuillez entrez la température moyenne (en °C):",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value3 = IntVar() -entree3 = Entry(fenetre, textvariable=value3, bg = "gray") +entree3 = Entry(fenetre, textvariable=value3) label4 = Label(fenetre, text="Veuillez entrez la température de référence (en °C) :",font = ('calibri', 10, 'bold', 'underline'),bg ='#fd9f9f',foreground="#4c75e3") value4 = IntVar() -entree4 = Entry(fenetre, textvariable=value4, bg = "gray") +entree4 = Entry(fenetre, textvariable=value4) label1.grid(pady=10) entree1.grid() From 0451abfb1975b14aa1287bc38cb1149ff42046c4 Mon Sep 17 00:00:00 2001 From: "gabrie.chataigner" Date: Mon, 30 May 2022 09:05:27 +0200 Subject: [PATCH 6/6] distance --- KNN_Mark1.py | 55 +++++++++++++++++++++++++++++++-------------------- Thumbs.db | Bin 8192 -> 8192 bytes 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/KNN_Mark1.py b/KNN_Mark1.py index 71eeb4e..dde42b4 100644 --- a/KNN_Mark1.py +++ b/KNN_Mark1.py @@ -25,28 +25,35 @@ def lecture(fichier): def estBissextile(an): """Fonction estBissextile qui prend en paramètre l’année à vérifier et qui renvoie True si elle est bissextile, False sinon""" - an_base = an - an = an//4 - if an*4 == an_base: - return True - else: - return False - -def kPlusProches(k,donnees_point,temp_num_jour): +# an_base = an +# an = an//4 +# if an*4 == an_base: +# return True +# else: +# return False + return an % 4 == 0 + +def kPlusProches(k,donnees_point,donnees): """Fonction qui prend en paramètre un tuple correspondant au point à vérifier, une liste du jeu de données et la conso électrique. Renvoie une liste triée en fonction de la distance dont les éléments sont des tuples.""" - - if k > len(temp_num_jour): - k = len(temp_num_jour) + if k > len(donnees): #par sécurité on réduit k + k = len(donnees) voisin=[] - for j in range(k): - voisin.append([None]) + for i in range(len(donnees)): + voisin.append(distance(donnees, donnees_point)) + voisin.sorted + return [voisins[i] for i in range(k)] + + +# for j in range(k): +# voisin.append([None]) - for i in range(len(temp_num_jour)): - MN = distance(temp_num_jour[i],donnees_point) - for l in range(k): - if voisin[l][1] == None or MN d2: + d_final = d2 + + y1 = temp_num_jour[2] y2 = donneespoint[1] z1 = temp_num_jour[3] z2 = donneespoint[2] - MN = ((x1-x2)**2)+((y1-y2)**2)+((z1-z2)**2) - return MN + return ((d_final)**2)+((y1-y2)**2)+((z1-z2)**2) -def PuissanceMoyenne(lst,distance): +def PuissanceMoyenne(lst,dist): """Calcule la moyenne de distances entre les points """ lecture("pic-journalier-consommation.csv") - moy = sum() / len() + conso_moy = sum() / len() def recup1(): k = 5 #value1.get() diff --git a/Thumbs.db b/Thumbs.db index eb0502d878373a79e19bcd58363ec30c0e5e5f33..de90a59e5c3d75311e4054b76568633b77f4a3fc 100644 GIT binary patch delta 191 zcmZp0XmFTd!^*_Kz`(fC@i?R5zyA=x3KU@jVs;?r0Afxc<^p1FAm#yLULfWJ;(wb3 znT|6~V)0>QoUF(qZ@u89zsdXJ8;l@xfYM-K#9+!`#t_e7$Y8>d#$X8~%@~q^bQ+MA z%3uM6#tg{}$w2**0$L1Aj8G?lsmYBjDr_u3V>(19Uu5x`e1v5W(8l+S6B7g%aYz6F D^5rz| delta 73 zcmZp0XmFTd!}{<4|Njgd9gj0^W?}omIElrF1t{=;G9#-B3rK2mAgj+LHlE1=tQ#gL Xu)08)C7TU6_ApN3lGrT4@j@H`%i