Skip to content

Commit 14687f3

Browse files
committed
Fix typos
1 parent 616ed76 commit 14687f3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

cebra/attribution/attribution_models.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

cebra/models/multiobjective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def __init__(self,
134134

135135
if max_slice_dim != self.num_output:
136136
raise ValueError(
137-
f"The dimension of ouput {self.num_output} is different than the highest dimension of slices {max_slice_dim}."
137+
f"The dimension of output {self.num_output} is different than the highest dimension of slices {max_slice_dim}."
138138
f"They need to have the same dimension.")
139139

140140
check_slices_for_gaps(self.feature_ranges)

0 commit comments

Comments
 (0)