SineGenerator#
- class capymoa.stream.generator.SineGenerator[source]#
Bases:
MOAStream
An SineGenerator
>>> from capymoa.stream.generator import SineGenerator ... >>> stream = SineGenerator() >>> stream.next_instance() LabeledInstance( Schema(generators.SineGenerator ), x=[0.731 0.41 0.208 0.333], 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.
- __iter__() Iterator[_AnyInstance] [source]#
Get an iterator over the stream.
This will NOT restart the stream if it has already been iterated over. Please use the
restart()
method to restart the stream.- Yield:
An iterator over the stream.
- __next__() _AnyInstance [source]#
Get the next instance in the stream.
- Returns:
The next instance in the stream.