Skip to content

Commit 880fbbe

Browse files
committed
No PR-curve plotting anymore, just beautifying.
1 parent 5957309 commit 880fbbe

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

__init__.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,27 +142,15 @@ def precrec(preds, gts, radius, pred_rphi=False, gt_rphi=False):
142142
# )
143143

144144

145-
def precision_recall_curve(precrecs, ls='-o', ax=None, **figkw):
146-
"""
147-
- `precrecs` list of (precision,recall) pairs.
148-
"""
149-
150-
ret = ax
151-
if ax is None:
152-
ret = fig, ax = plt.subplots(**figkw)
153-
154-
precs, recs = zip(*precrecs)
155-
156-
ax.plot([0,1], [1,0], ls="--", c=".6")
157-
ax.plot(recs, precs, ls)
145+
def prettify_pr_curve(ax):
146+
ax.plot([0,1], [0,1], ls="--", c=".6")
158147
ax.set_xlim(-0.02,1.02)
159148
ax.set_ylim(-0.02,1.02)
160149
ax.set_xlabel("Recall [%]")
161150
ax.set_ylabel("Precision [%]")
162151
ax.axes.xaxis.set_major_formatter(mpl.ticker.FuncFormatter(lambda x, pos: '{:.0f}'.format(x*100)))
163152
ax.axes.yaxis.set_major_formatter(mpl.ticker.FuncFormatter(lambda x, pos: '{:.0f}'.format(x*100)))
164-
165-
return ret
153+
return ax
166154

167155

168156
def votes_to_detections(locations, probas=None, in_rphi=True, out_rphi=True, bin_size=0.1, blur_win=21, blur_sigma=2.0, x_min=-15.0, x_max=15.0, y_min=-5.0, y_max=15.0, retgrid=False):

0 commit comments

Comments
 (0)