alpbench.pipeline.Initializer¶

Classes

Initializer()

This abstract class initially queries instances of the data to costruct the set of labeled data.

RandomInitializer(seed)

Randomly selects a subset of the unlabeled data to be queried.

class alpbench.pipeline.Initializer.Initializer[source]¶

Bases: ABC

This abstract class initially queries instances of the data to costruct the set of labeled data.

abstract sample(X_u, num_samples)[source]¶

Abstract method, that queries the initial instances of the data.

class alpbench.pipeline.Initializer.RandomInitializer(seed)[source]¶

Bases: Initializer

Randomly selects a subset of the unlabeled data to be queried.

Parameters:

seed (int) – The seed for the random number generator.

qs¶

RandomSampling class from skactiveml.pool.

Type:

class

sample(X_u, num_samples)[source]¶

Queries the initial instances of the data, sampling uniformly at random

Parameters:
  • X_u (np.ndarray) – The unlabeled data.

  • num_samples (int) – The number of instances to query.

Returns:

The indices of the queried instances.

Return type:

np.ndarray