Coding Exercise on Metrics of Interpretability

Complete this coding exercise on metrics of interpretability and the implementation of a sign agreement (SA).

Problem statement: Sign agreement

Similar to the Top-k feature agreement metric, the sign agreement (SA) metric computes the fraction of Top-k features that are not only common between a given post-hoc explanation and the corresponding ground-truth explanation but also share the same sign (direction of contribution).

In other words, given a post-hoc explanation SS and the ground-truth explanation SgS_g, the sign agreement SAk(S,Sg)SA_{k}(S, S_g) can be expressed as follows:

Get hands-on with 1200+ tech skills courses.