|
|
@ -11,6 +11,8 @@ def lancer(k, date, temp_moy, temp_ref, donnees): |
|
|
|
print(donnees_point) |
|
|
|
print(donnees) |
|
|
|
lst_k_plus_proches = kPlusProches(k, donnees_point, donnees) |
|
|
|
conso_moy = PuissanceMoyenne(lst_k_plus_proches) |
|
|
|
label9.configure(text=conso_moy) |
|
|
|
|
|
|
|
def lecture(fichier): |
|
|
|
temp_jour = [] |
|
|
@ -111,7 +113,7 @@ def distance(donnees, donneespoint, i): |
|
|
|
def PuissanceMoyenne(lst_k_plus_proches): |
|
|
|
"""Calcule la moyenne de distances entre les points """ |
|
|
|
lecture("pic-journalier-consommation.csv") |
|
|
|
conso_moy =0 # sum() / len(lst_k_plus_proches) |
|
|
|
conso_moy = 10 # sum() / len(lst_k_plus_proches) |
|
|
|
return conso_moy |
|
|
|
|
|
|
|
global colour |
|
|
@ -159,8 +161,7 @@ def recup4(): |
|
|
|
|
|
|
|
def calc_conso(): |
|
|
|
conso_moy = PuissanceMoyenne(lst_k_plus_proches) |
|
|
|
Conso = conso_moy |
|
|
|
label9.configure(text=Conso) |
|
|
|
label9.configure(text=conso_moy) |
|
|
|
|
|
|
|
label1 = Label(fenetre, text="Choisissez le nombre de voisins (k) :", font = |
|
|
|
txt_design, bg ='#005dff', foreground="#ff5733") |
|
|
|