Skip to content

Commit 2cbdbe0

Browse files
bwadaclaude
andcommitted
docs: address feedback on multi-class non-overlap guidance
- Recommend "a separate detector for each question you want to answer" rather than specifically a binary detector. The right mode follows from the question, so over-prescribing binary was wrong. - Use "classes" instead of "categories" in the intro sentence to match the rest of the callout, the class_names parameter, and standard ML literature (scikit-learn, etc.). - Swap the docstring co-occurrence example from a subject+attribute pair ("Dog" / "Wearing collar") to a paired-objects example ("a person and a dog") — the canonical multi-label intuition. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1ec3c25 commit 2cbdbe0

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

docs/docs/answer-modes/2-multi-choice-detectors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Multiple Choice (Choose One) Detectors
22

3-
Use a multi-class detector to classify each image into exactly one of a list of mutually exclusive categories.
3+
Use a multi-class detector to classify each image into one of several mutually exclusive classes.
44

55
```python notest
66
from groundlight import ExperimentalApi
@@ -19,7 +19,7 @@ detector = gl_exp.create_multiclass_detector(
1919
:::caution Use non-overlapping classes
2020
Multi-class detectors are designed for **mutually exclusive** classes — each image should match exactly one. They always return a single label and are **not** multi-label classifiers.
2121

22-
A quick test: if your question is *"Which one of these is it?"*, a multi-class detector fits. If it's *"Which of these are present?"* — meaning more than one could be true at once — use a separate [binary detector](1-binary-detectors.md) for each class instead.
22+
A quick test: if your question is *"Which one of these is it?"*, a multi-class detector fits. If it's *"Which of these are present?"* — meaning more than one could be true at once — create a separate detector for each question you want to answer instead.
2323
:::
2424

2525
:::tip

src/groundlight/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,8 +1682,9 @@ def create_multiclass_detector( # noqa: PLR0913 # pylint: disable=too-many-argu
16821682
``class_names``. It is designed for **mutually exclusive
16831683
(non-overlapping)** classes — each image should fit exactly one.
16841684
Multi-class detectors are **not** multi-label classifiers; if your
1685-
classes can co-occur (e.g. an image can be both "Dog" and "Wearing
1686-
collar"), use a separate binary detector for each class instead.
1685+
classes can co-occur in the same image (e.g. an image can contain both
1686+
a person and a dog), create a separate detector for each question you
1687+
want to answer instead.
16871688
16881689
**Example usage**::
16891690

0 commit comments

Comments
 (0)