from_dataset

probly.evaluation.active_learning.from_dataset = <flextype.singledispatch.Flexdispatch object>

Create a pool by randomly splitting training data into labeled and unlabeled subsets.

Dispatches on the type of x to select the appropriate backend.

Parameters:
  • x – Full training feature matrix.

  • y – Full training label array.

  • x_test – Test feature matrix (kept as-is).

  • y_test – Test label array (kept as-is).

  • initial_size – Number of samples to place in the initial labeled set. Must be at least 1 and less than the number of training samples.

  • seed – Seed for the random number generator. Pass None for a non-deterministic split.

Returns:

A backend-specific ActiveLearningPool with initial_size labeled samples and the remainder in the unlabeled pool.

Raises:

ValueError – If initial_size is not in [1, len(x) - 1].

Examples using probly.evaluation.active_learning.from_dataset

Active Learning with sklearn - Margin vs Random

Active Learning with sklearn - Margin vs Random

Active Learning with PyTorch - BADGE Selection

Active Learning with PyTorch - BADGE Selection