diff options
Diffstat (limited to 'src/algorithms.py')
| -rw-r--r-- | src/algorithms.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/algorithms.py b/src/algorithms.py index 51f57bf..24a63f3 100644 --- a/src/algorithms.py +++ b/src/algorithms.py @@ -72,6 +72,8 @@ def correctness_measure(G, G_hat, print_values=True): f1_score = 2.* tp / (2 * tp + fp + fn) fall_out = 1. * fp / (fp + tn) + norm = np.linalg.norm(G.mat - G_hat.mat) + if print_values: print("False Positives: {}".format(fp)) print("False Negatives: {}".format(fn)) @@ -81,7 +83,8 @@ def correctness_measure(G, G_hat, print_values=True): print("Precision: {}".format(precision)) print("Recall: {}".format(recall)) print("F1 score: {}".format(f1_score)) - print("Fall Out: {}".format(fall_out)) + print("Fall Out: {}".format(fall_out)) + print("l2_norm: {}".format(norm)) return fp, fn, tp, tn |
