incerto.active.active_learning_loop#
- incerto.active.active_learning_loop(model, x_pool, y_pool, strategy, num_rounds=10, initial_labeled=100, train_fn=None, eval_fn=None, random_seed=None)[source]#
Run a full active learning loop.
- Parameters:
model (
Module) – Model to trainx_pool (
Tensor) – Full data pooly_pool (
Tensor) – Full labelsstrategy – Query strategy (batch size is controlled by the strategy)
num_rounds (
int) – Number of active learning roundsinitial_labeled (
int) – Number of initial labeled samplestrain_fn (
Optional[callable]) – Function to train model (model, x_train, y_train)eval_fn (
Optional[callable]) – Function to evaluate model (model, x_test, y_test)
- Return type:
- Returns:
Dictionary with results