STAGGERGenerator#
- class capymoa.stream.generator.STAGGERGenerator[source]#
Bases:
Stream
An STAGGER Generator
>>> from capymoa.stream.generator import STAGGERGenerator ... >>> stream = STAGGERGenerator() >>> stream.next_instance() LabeledInstance( Schema(generators.STAGGERGenerator ), x=ndarray(..., 3), y_index=0, y_label='false' ) >>> stream.next_instance().x array([0., 2., 1.])
- __init__(
- instance_random_seed: int = 1,
- classification_function: int = 1,
- balance_classes: bool = False,
Construct a STAGGER Generator .
- Parameters:
instance_random_seed – Seed for random generation of instances, defaults to 1
classification_function – Classification function used, as defined in the original paper.
balance – Balance the number of instances of each class.
- next_instance() LabeledInstance | RegressionInstance [source]#
Return the next instance in the stream.
- Raises:
ValueError – If the machine learning task is neither a regression nor a classification task.
- Returns:
A labeled instances or a regression depending on the schema.