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
xto 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
Nonefor a non-deterministic split.
- Returns:
A backend-specific
ActiveLearningPoolwithinitial_sizelabeled samples and the remainder in the unlabeled pool.- Raises:
ValueError – If
initial_sizeis not in[1, len(x) - 1].