CountSampler Class

Default sampler.

Create default sampler.

Inheritance
CountSampler

Constructor

CountSampler(seed: int, min_examples_per_class: int = 2000, max_rows: int = 10000, is_constraint_driven: bool = True, task: str = 'classification', train_frac: float | None = None, *args: Any, **kwargs: Any)

Parameters

Name Description
seed
Required

Random seed to use to sample.

min_examples_per_class

Minimum examples per class to sample.

default value: 2000
max_rows

Maximum rows to output.

default value: 10000
is_constraint_driven

Is constraint driven or not.

default value: True
task

The task type corresponding to this sweeping experiment.

default value: classification
train_frac

Fraction of data to be considered for constrained training.

default value: None

Methods

sample

Sample the give input data.

sample

Sample the give input data.

sample(X: ndarray | DataFrame | spmatrix, y: ndarray | Series | Categorical, cols: str | List[str] | None = None) -> Tuple[ndarray | DataFrame | spmatrix, ndarray | Series | Categorical, SplittingConfig]

Parameters

Name Description
X
Required

Input data.

y
Required

Output label.

cols

Optionally, the specific input column(s) over which to sample.

default value: None

Returns

Type Description

Sampled data.