andrey.metrics.coefficient_mae#
- andrey.metrics.coefficient_mae(estimated_w, true_w)[source]#
Mean absolute coefficient error over the true edges (edges absent in truth are ignored).
A missed true edge contributes its full
|w_true|(so this blends coefficient error with recall on the true support); returns 0.0 when the truth has no weighted edges. Both inputs use the canonicalW[i, j]= weight of edgei -> jorientation – note LiNGAM’sBis the transpose, and adapters normalize to this before storing.- Return type:
Examples
>>> coefficient_mae([[0.0, 0.9], [0.0, 0.0]], [[0.0, 1.0], [0.0, 0.0]]) 0.09999999999999998