Skip to content

Commit

Permalink
Merge branch 'master' of github.com:opentraffic/reporter-quality-test…
Browse files Browse the repository at this point in the history
…ing-rig

validator behind
  • Loading branch information
mxndrwgrdnr committed Aug 23, 2017
2 parents 23575b1 + 2d43c57 commit e8f4ff8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions validator/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def get_optimal_speed_error_threshold(speedDf, allowNegativeThresholds=False,


def plot_accuracy_heatmap(speedDf, thresholds, sampleRates,
noiseLevels, saveFig=True):
noiseLevels, kind='optimal', saveFig=True):
accMat = np.ones((len(sampleRates), len(noiseLevels)))
for i, sampleRate in enumerate(sampleRates):
if len(thresholds) == len(sampleRates):
Expand Down Expand Up @@ -413,7 +413,11 @@ def plot_accuracy_heatmap(speedDf, thresholds, sampleRates,
ax.set_yticks(
np.arange(min(sampleRates), max(sampleRates), len(sampleRates)))
ax.set_yticklabels([''] + map(str, (map(int, sampleRates))))
ax.set_title("Accuracy at Optimal Error Threshold", fontsize=15)
if kind == 'optimal':
ax.set_title("Accuracy at Optimal Error Threshold", fontsize=15)
else:
ax.set_title(
"Accuracy at Route-Specific Error Thresholds", fontsize=15)
plt.show()
if saveFig:
fig.savefig('map_matching_acc_at_threshold.png')
Expand Down

0 comments on commit e8f4ff8

Please sign in to comment.