Skip to content

Commit

Permalink
Added verbose toggle when setting tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
carson-sky committed Apr 18, 2023
1 parent d5ef5ca commit acd3aee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions vpred/robotvpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def find_y(self):
else:
print('Error: find_y: tolerance units needs to be in frame or units but is {0}'.format(self.units))

def set_tolerance(self, tolerance, units):
def set_tolerance(self, tolerance, units, verbose=True):
'''
Set tolerance in meters or frames
'''
Expand All @@ -125,24 +125,24 @@ def set_tolerance(self, tolerance, units):
#if self.units == 'm':
# self.match_exists=(self.min_error<=self.tolerance)
#--------
print('tolerance={0} {1}'.format(self.tolerance, self.units))
if verbose == True:
print('tolerance={0} {1}'.format(self.tolerance, self.units))

def set_description(self,description):
self.description = description

def assess_performance(self, tolerance=1, units='frames', match_found=None):
def assess_performance(self, tolerance=1, units='frames', match_found=None, verbose=True):
'''
Compute performance parameters of VPR technique given tolerance in frames or units
Note the match_found vector can be used where true negatives exist in the data.
Here, match_found=None is not referring to no matches found, but simply not specifying matches found
'''
self.set_tolerance(tolerance,units)
print('tolerance={0} {1}'.format(tolerance, units))
self.find_y()
if match_found is None:
match_found=self.ALL_TRUE
return find_vpr_performance_metrics(match_found,self.y,self.match_exists,verbose=True);
return find_vpr_performance_metrics(match_found,self.y,self.match_exists,verbose=verbose);

def plot_PRcurve(self):
'''
Expand Down

0 comments on commit acd3aee

Please sign in to comment.