-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into BAAL-288/experiment_api_v2
- Loading branch information
Showing
5 changed files
with
62 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Stopping Criteria | ||
|
||
Stopping criterion are used to determine when to stop your active learning experiment. | ||
|
||
Their usage are simple, but best put in practice with `ActiveExperiment`. | ||
|
||
**Example** | ||
```python | ||
from baal.active.stopping_criteria import LabellingBudgetStoppingCriterion | ||
from baal.active.dataset import ActiveLearningDataset | ||
|
||
al_dataset: ActiveLearningDataset = ... # len(al_dataset) == 10 | ||
criterion = LabellingBudgetStoppingCriterion(al_dataset, labelling_budget=100) | ||
|
||
assert not criterion.should_stop({}, []) | ||
|
||
# len(al_dataset) == 60 | ||
al_dataset.label_randomly(50) | ||
assert not criterion.should_stop({}, []) | ||
|
||
# len(al_dataset) == 110, budget exhausted! We've labelled 100 items. | ||
al_dataset.label_randomly(50) | ||
assert criterion.should_stop({}, []) | ||
``` | ||
|
||
|
||
### API | ||
|
||
### baal.active.stopping_criteria | ||
|
||
::: baal.active.stopping_criteria.LabellingBudgetStoppingCriterion | ||
|
||
::: baal.active.stopping_criteria.LowAverageUncertaintyStoppingCriterion | ||
|
||
::: baal.active.stopping_criteria.EarlyStoppingCriterion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters