Skip to content

Commit

Permalink
Rename curve into recall
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Sep 28, 2024
1 parent 31012f8 commit 0deca25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ with open_state("example.asreview") as s:
![Recall with absolute
axes](https://github.com/asreview/asreview-insights/blob/main/docs/example_absolute_axes.png)

#### Example: Adjusting the random and optimal curves
#### Example: Adjusting the random and optimal recalls

By default, each plot will have a curve representing optimal performance, and a
curve representing random sampling performance. Both curves can be removed from
Expand Down
8 changes: 4 additions & 4 deletions asreviewcontrib/insights/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def plot_recall(
show_random: bool
Show the random curve in the plot.
show_optimal: bool
Show the optimal curve in the plot.
Show the optimal recall in the plot.
show_legend: bool
If state_obj contains multiple states, show a legend in the plot.
legend_values: list[str]
Expand Down Expand Up @@ -407,12 +407,12 @@ def _add_random_curve(ax, labels, x_absolute, y_absolute):


def _add_optimal_curve(ax, labels, x_absolute, y_absolute):
"""Add a optimal curve to a plot using step-wise increments.
"""Add a optimal recall to a plot using step-wise increments.
Returns
-------
plt.axes.Axes
Axes with optimal curve added.
Axes with optimal recall added.
"""
# get total amount of positive labels
if isinstance(labels[0], list):
Expand All @@ -434,7 +434,7 @@ def _add_optimal_curve(ax, labels, x_absolute, y_absolute):
else np.arange(0, n_pos_docs + 1) / n_pos_docs
)

# Plot the stepwise optimal curve
# Plot the stepwise optimal recall
ax.step(x, y, color="grey", where="post")

return ax
Expand Down
2 changes: 1 addition & 1 deletion docs/example_multiple_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
plot_recall(ax, s2)

# Set the labels for the legend. Both plots add the recall line, the random
# curve, and the optimal curve. Hence the recall lines are the 0th and 3nd line.
# curve, and the optimal recall. Hence the recall lines are the 0th and 3nd line.
ax.lines[0].set_label("Naive Bayes")
ax.lines[3].set_label("Logistic")
ax.legend()
Expand Down

0 comments on commit 0deca25

Please sign in to comment.