@@ -102,9 +102,9 @@ def compute_metrics(self, attribution_map, ground_truth_map):
102102 def compute_attribution_score (self , attribution_map , ground_truth_map ):
103103 assert attribution_map .shape == ground_truth_map .shape
104104 assert np .issubdtype (ground_truth_map .dtype , bool )
105- fpr , tpr , _ = sklearn .metrics .roc_curve (ground_truth_map . flatten (),
106- attribution_map .flatten ())
107- auc = sklearn .metrics .auc (fpr , tpr )
105+ fpr , tpr , _ = sklearn .metrics .roc_curve ( # noqa: codespell:ignore fpr, tpr
106+ ground_truth_map . flatten (), attribution_map .flatten ())
107+ auc = sklearn .metrics .auc (fpr , tpr ) # noqa: codespell:ignore fpr, tpr
108108 return auc
109109
110110 @staticmethod
@@ -175,9 +175,10 @@ def _inverse_lsq_cvxpy(matrix: np.ndarray,
175175
176176 identity = np .eye (matrix .shape [0 ])
177177 matrix_inverse = cp .Variable ((matrix .shape [1 ], matrix .shape [0 ]))
178-
178+ # noqa: codespell
179179 objective = cp .Minimize (
180- cp .norm (matrix @ matrix_inverse - identity , "fro" ))
180+ cp .norm (matrix @ matrix_inverse - identity ,
181+ "fro" )) # noqa: codespell:ignore fro
181182 prob = cp .Problem (objective )
182183 prob .solve (verbose = False , solver = solver )
183184
0 commit comments