VANDEPOELE Enzo
3 years ago
1 changed files with 13 additions and 19 deletions
@ -1,19 +1,13 @@ |
|||||
# -*- coding: utf-8 -*- |
def kPlusProches(k,donnees_point,temp_jour): |
||||
""" |
"""erreur""" |
||||
Éditeur de Spyder |
voisins = [] |
||||
|
if k > len(temp_jour[0]): |
||||
Ceci est un script temporaire. |
k = len(temp_jour[0]) |
||||
""" |
energy = temp_jour.pop() |
||||
def kPlusProches(k,donnees_point,temp_jour): |
energy.sort |
||||
"""erreur""" |
for i in range(len(temp_jour[0])): |
||||
voisins = [] |
d = distance(temp_jour[i],donnees_point) |
||||
if k > len(temp_jour[0]): |
voisins.append((d, i)) |
||||
k = len(temp_jour[0]) |
voisins.sort() |
||||
energy = temp_jour.pop() |
return [voisins[i][1] for i in range(k)] |
||||
energy.sort |
|
||||
for i in range(len(temp_jour[0])): |
|
||||
d = distance(temp_jour[i],donnees_point) |
|
||||
voisins.append((d, i)) |
|
||||
voisins.sort() |
|
||||
return [voisins[i][1] for i in range(k)] |
|
||||
|
|
||||
|
Loading…
Reference in new issue