|
@@ -2,6 +2,7 @@ from sklearn.cluster import DBSCAN
|
|
|
from sklearn import metrics
|
|
|
import numpy as np
|
|
|
import matplotlib.pyplot as plt
|
|
|
+from itertools import groupby
|
|
|
|
|
|
import csv_parser
|
|
|
import recog
|
|
@@ -9,7 +10,14 @@ import metric
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
data = csv_parser.parse_data_from_csv('test0714.csv')
|
|
|
- entries = recog.recognize_entries(data)
|
|
|
+ groups = groupby(data, key = lambda x: x.hwid)
|
|
|
+ entries = []
|
|
|
+ for k, grp in groups:
|
|
|
+ data1 = list(grp)
|
|
|
+ entries1 = recog.recognize_entries(data)
|
|
|
+ for i in entries1:
|
|
|
+ entries.append(i)
|
|
|
+ print(entries)
|
|
|
x = []
|
|
|
for e in entries:
|
|
|
x.append([e.lon, e.lat])
|