SineGenerator#
- class capymoa.stream.generator.SineGenerator[source]#
Bases:
Stream
An SineGenerator
>>> from capymoa.stream.generator import SineGenerator ... >>> stream = SineGenerator() >>> stream.next_instance() LabeledInstance( Schema(generators.SineGenerator ), x=ndarray(..., 4), y_index=0, y_label='positive' ) >>> stream.next_instance().x array([0.96775591, 0.00611718, 0.9637048 , 0.93986539])
- __init__(
- instance_random_seed: int = 1,
- classification_function: int = 1,
- suppress_irrelevant_attributes: bool = False,
- balance_classes: bool = False,
Construct a SineGenerator .
- Parameters:
instance_random_seed – Seed for random generation of instances, defaults to 1
classification_function – Classification function used, as defined in the original paper.
suppress_irrelevant_attributes – Reduce the data to only contain 2 relevant numeric attributes
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.