Skip to content

Commit

Permalink
Remove all remaining occurences in docstrings for unused c and p argu…
Browse files Browse the repository at this point in the history
…ments.

#167 (comment)
  • Loading branch information
dkrako committed Oct 12, 2022
1 parent ca22b6f commit 55921a2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 31 deletions.
4 changes: 0 additions & 4 deletions quantus/metrics/axiomatic/completeness.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,6 @@ def evaluate_instance(
The explanation to be evaluated on an instance-basis.
s: np.ndarray
The segmentation to be evaluated on an instance-basis.
c: any
The custom input to be evaluated on an instance-basis.
p: any
The custom preprocess input to be evaluated on an instance-basis.
Returns
-------
Expand Down
8 changes: 4 additions & 4 deletions quantus/metrics/localisation/focus.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,10 @@ def evaluate_instance(
i: int,
model: ModelInterface,
x: np.ndarray,
y: np.ndarray,
a: np.ndarray,
s: np.ndarray,
c: np.ndarray,
y: np.ndarray = None,
a: np.ndarray = None,
s: np.ndarray = None,
c: np.ndarray = None,
) -> float:
"""
Evaluate instance gets model and data for a single instance as input and returns the evaluation result.
Expand Down
14 changes: 6 additions & 8 deletions quantus/metrics/randomisation/model_parameter_randomisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ def evaluate_instance(
self,
model: ModelInterface,
x: np.ndarray,
y: np.ndarray,
a: np.ndarray,
s: np.ndarray,
a_perturbed: np.ndarray,
y: np.ndarray = None,
a: np.ndarray = None,
s: np.ndarray = None,
a_perturbed: np.ndarray = None,
) -> float:
"""
Evaluate instance gets model and data for a single instance as input and returns the evaluation result.
Expand All @@ -339,10 +339,8 @@ def evaluate_instance(
The explanation to be evaluated on an instance-basis.
s: np.ndarray
The segmentation to be evaluated on an instance-basis.
c: any
The custom input to be evaluated on an instance-basis.
p: any
The custom preprocess input to be evaluated on an instance-basis.
a_perturbed: np.ndarray
The perturbed attributions.
Returns
-------
Expand Down
10 changes: 3 additions & 7 deletions quantus/metrics/randomisation/random_logit.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ def evaluate_instance(
i: int,
model: ModelInterface,
x: np.ndarray,
y: np.ndarray,
a: np.ndarray,
s: np.ndarray,
y: np.ndarray = None,
a: np.ndarray = None,
s: np.ndarray = None,
) -> float:
"""
Evaluate instance gets model and data for a single instance as input and returns the evaluation result.
Expand All @@ -247,10 +247,6 @@ def evaluate_instance(
The explanation to be evaluated on an instance-basis.
s: np.ndarray
The segmentation to be evaluated on an instance-basis.
c: any
The custom input to be evaluated on an instance-basis.
p: any
The custom preprocess input to be evaluated on an instance-basis.
Returns
-------
Expand Down
14 changes: 6 additions & 8 deletions quantus/metrics/robustness/consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ def evaluate_instance(
i: int,
model: ModelInterface,
x: np.ndarray,
y: np.ndarray,
a: np.ndarray,
s: np.ndarray,
a_label: Any,
y: np.ndarray = None,
a: np.ndarray = None,
s: np.ndarray = None,
a_label: np.ndarray = None,
) -> float:
"""
Evaluate instance gets model and data for a single instance as input and returns the evaluation result.
Expand All @@ -255,10 +255,8 @@ def evaluate_instance(
The explanation to be evaluated on an instance-basis.
s: np.ndarray
The segmentation to be evaluated on an instance-basis.
c: any
The custom input to be evaluated on an instance-basis.
p: any
The custom preprocess input to be evaluated on an instance-basis.
a_label: np.ndarray
The discretised attribution labels.
Returns
-------
Expand Down

0 comments on commit 55921a2

Please sign in to comment.