ddn3.performance
This module implents helper functions for performance evaluation.
Module Contents
Functions
|
Estimate common and differential network error based on a list of estimations |
|
Estimate common and differential network error for DINGO. |
|
|
|
Calculate F1 score based on precision and recall |
- ddn3.performance.scan_error_measure(t1_lst, t2_lst, comm_gt, diff_gt)
Estimate common and differential network error based on a list of estimations
Let P be the number of features, and M be the number of estimates.
- Parameters:
t1_lst (array_like) – Estimated precision matrix for condition 1 of shape (M, P, P).
t2_lst (array_like) – Estimated precision matrix for condition 2 shape (M, P, P).
comm_gt (ndarray) – Ground truth common network of shape (P, P).
diff_gt – Ground truth differential network of shape (P, P).
- Returns:
res_comm (ndarray) – Performance measures for the common network estimation. Shape (M, 5).
res_diff (ndarray) – Performance measures for the differential network estimation. Shape (M, 5).
- ddn3.performance.scan_erro_measure_dingo(comm_dingo, diff_dingo, comm_gt, diff_gt)
Estimate common and differential network error for DINGO.
For DINGO, we apply different thresholds on the common network precision matrix, and differential score matrix to get the binary adjacency matrix.
Let P be the number of features. Let M be the number thresholds.
- Parameters:
t1_lst (array_like) – Estimated precision matrix for condition 1 of shape (P, P).
t2_lst (array_like) – Estimated precision matrix for condition 2 shape (P, P).
comm_gt (ndarray) – Ground truth common network of shape (P, P).
diff_gt – Ground truth differential network of shape (P, P).
- Returns:
res_comm_dingo (ndarray) – Performance measures for the common network estimation. Shape (M, 5).
res_diff_dingo (ndarray) – Performance measures for the differential network estimation. Shape (M, 5).
- ddn3.performance.get_error_measure_two_theta(net_est, net_gt)
- ddn3.performance.get_f1(recall, precision)
Calculate F1 score based on precision and recall