Skip to content

Commit 8d2ef0a

Browse files
0.32.1
1 parent c37afbc commit 8d2ef0a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "spotpython"
10-
version = "0.32.0"
10+
version = "0.32.1"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

src/spotpython/utils/metrics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def get_metric_sign(metric_name):
201201
raise ValueError(f"Metric '{metric_name}' not found.")
202202

203203

204-
def calculate_xai_consistency_corr(attributions):
204+
def calculate_xai_consistency_corr(attributions) -> float:
205205
"""
206206
Calculates the consistency of XAI methods by computing the mean of the upper triangle
207207
of the correlation matrix of the provided attributions.
@@ -227,7 +227,7 @@ def calculate_xai_consistency_corr(attributions):
227227
return result_xai
228228

229229

230-
def calculate_xai_consistency_cosine(attributions):
230+
def calculate_xai_consistency_cosine(attributions) -> float:
231231
"""
232232
Calculates the consistency of XAI methods by computing the mean of the upper triangle
233233
of the cosine similarity matrix of the provided attributions.
@@ -253,7 +253,7 @@ def calculate_xai_consistency_cosine(attributions):
253253
return result_xai
254254

255255

256-
def calculate_xai_consistency_euclidean(attributions):
256+
def calculate_xai_consistency_euclidean(attributions) -> float:
257257
"""
258258
Calculates the consistency of XAI methods by computing the mean of the upper triangle
259259
of the Euclidean distance matrix of the provided attributions.
@@ -278,7 +278,7 @@ def calculate_xai_consistency_euclidean(attributions):
278278
print(result_xai)
279279
return result_xai
280280

281-
def calculate_xai_consistency_spearman(attributions):
281+
def calculate_xai_consistency_spearman(attributions) -> float:
282282
"""
283283
Calculates the consistency of XAI methods using Spearman rank correlation.
284284

0 commit comments

Comments
 (0)