mirror of
https://github.com/clearml/clearml
synced 2025-03-03 10:42:00 +00:00
Fix pr_curve in TensorBoard 2+
This commit is contained in:
parent
e9f8fc949d
commit
8babddd654
@ -517,11 +517,11 @@ class EventTrainsWriter(object):
|
|||||||
num_thresholds = plot_values.shape[1]
|
num_thresholds = plot_values.shape[1]
|
||||||
width = 1.0 / num_thresholds
|
width = 1.0 / num_thresholds
|
||||||
thresholds = np.arange(0.0, 1.0, width, dtype=plot_values.dtype)
|
thresholds = np.arange(0.0, 1.0, width, dtype=plot_values.dtype)
|
||||||
data_points = ['TP ', 'FP ', 'TN ', 'FN ', 'Precision ', ' Recall']
|
data_points = ['Threshold ', 'TP ', 'FP ', 'TN ', 'FN ', 'Precision ', ' Recall']
|
||||||
series = [{'name': series, 'data': np.vstack((thresholds, plot_values[-2])).T,
|
series = [{'name': series, 'data': np.vstack((plot_values[-1], plot_values[-2])).T,
|
||||||
'labels': [''.join(data_points) + '<br> ' +
|
'labels': [''.join(data_points) + '<br> {:.3f} '.format(thresholds[j]) +
|
||||||
' '.join(['%-3.2f' % v for v in plot_values[:, j]]) for j in
|
' '.join(['%-3.2f' % v for v in plot_values[:, j]]) for j in
|
||||||
range(plot_values.shape[1])]}]
|
range(num_thresholds)]}]
|
||||||
reverse_xaxis = False
|
reverse_xaxis = False
|
||||||
else:
|
else:
|
||||||
reverse_xaxis = False
|
reverse_xaxis = False
|
||||||
|
Loading…
Reference in New Issue
Block a user