MCPcopy Index your code
hub / github.com/nywang16/Pixel2Mesh / f_score

Function f_score

eval_testset.py:74–86  ·  view source on GitHub ↗
(label, predict, dist_label, dist_pred, threshold)

Source from the content-addressed store, hash-verified

72 return feed_dict
73
74def f_score(label, predict, dist_label, dist_pred, threshold):
75 num_label = label.shape[0]
76 num_predict = predict.shape[0]
77
78 f_scores = []
79 for i in range(len(threshold)):
80 num = len(np.where(dist_label <= threshold[i])[0])
81 recall = 100.0 * num / num_label
82 num = len(np.where(dist_pred <= threshold[i])[0])
83 precision = 100.0 * num / num_predict
84
85 f_scores.append((2*precision*recall)/(precision+recall+1e-8))
86 return np.array(f_scores)
87
88# Load data
89data = DataFetcher(FLAGS.data_list)

Callers 1

eval_testset.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected