more stations = more good
This commit is contained in:
parent
16e42d9839
commit
5d8af2ca1d
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ class LocatorSpace:
|
|||
def get_best_point(self, scan_values, station_ids):
|
||||
stations = tuple(self.stations_lookup[station_id] for station_id in station_ids)
|
||||
values = np.array(tuple(scan_values[station_id]**2 for station_id in station_ids), dtype=np.int32)
|
||||
scores = np.sum((self.levels[:, stations]-values)**2, axis=1)/len(stations)
|
||||
scores = np.sum((self.levels[:, stations]-values)**2, axis=1) / len(stations) / (1.1**len(stations))
|
||||
best_point = np.argmin(scores).ravel()[0]
|
||||
return self.points[best_point], scores[best_point]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue