Skip to content

Commit b2eeede

Browse files
committed
fix: minor docstring fixes
1 parent 9b0f119 commit b2eeede

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

modAL/uncertainty.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,19 @@ def margin_sampling(classifier: BaseEstimator, X: modALinput,
163163
n_instances: int = 1, random_tie_break: bool = False,
164164
**uncertainty_measure_kwargs) -> Tuple[np.ndarray, modALinput]:
165165
"""
166-
Margin sampling query strategy. Selects the instances where the difference between the first most likely and second
167-
most likely classes are the smallest.
166+
Margin sampling query strategy. Selects the instances where the difference between
167+
the first most likely and second most likely classes are the smallest.
168168
Args:
169169
classifier: The classifier for which the labels are to be queried.
170170
X: The pool of samples to query from.
171171
n_instances: Number of samples to be queried.
172-
**uncertainty_measure_kwargs: Keyword arguments to be passed for the uncertainty measure function.
172+
random_tie_break: If True, shuffles utility scores to randomize the order. This
173+
can be used to break the tie when the highest utility score is not unique.
174+
**uncertainty_measure_kwargs: Keyword arguments to be passed for the uncertainty
175+
measure function.
173176
Returns:
174-
The indices of the instances from X chosen to be labelled; the instances from X chosen to be labelled.
177+
The indices of the instances from X chosen to be labelled;
178+
the instances from X chosen to be labelled.
175179
"""
176180
margin = classifier_margin(classifier, X, **uncertainty_measure_kwargs)
177181

0 commit comments

Comments
 (0)