Oracle¶
The Oracle provides ground-truth labels for candidates. It can operate in two modes: offline
(using a dataset to query labels) or online (using a model to generate labels, simulating real
experiments). The oracle is used during the active learning loop to evaluate selected candidates
and provide feedback for training the surrogate model.
- class alf_core.oracle.oracle.Oracle(scorer)[source]¶
Bases:
objectOracle model is used to evaluate new candidates proposed by the search/optimiser process. For offline optimization tasks, the oracle is the dataset. For online optimization tasks, the oracle is a model.
- evaluate(candidates, state)[source]¶
Evaluate candidates and return their labels.
- Parameters:
- Returns:
Candidates paired with their evaluated labels
Updated state with oracle_time metric
- Return type:
tuple[LabelledCandidates,State]