SEA#
- class frouros.datasets.synthetic.SEA(seed: int | None = None)#
SEA generator [street2001streaming].
- Parameters:
seed (Optional[int]) – seed value, defaults to None
- References:
[street2001streaming]Street, W. Nick, and YongSeog Kim. “A streaming ensemble algorithm (SEA) for large-scale classification.” Proceedings of the seventh ACM SIGKDD international conference on Knowledge discovery and data mining. 2001.
- Example:
>>> from frouros.datasets.synthetic import SEA >>> sea = SEA(seed=31) >>> dataset = sea.generate_dataset(block=1, noise=0.1, num_samples=5) >>> for X, y in dataset: ... print(X, y) [2.86053822 9.58105567 7.70312932] 0 [2.08165462 1.36917049 9.08373802] 0 [8.36483632 1.12172604 8.3489916 ] 0 [2.44680795 1.36231348 7.22094455] 1 [1.28477715 2.20364007 5.19211202] 1
- generate_dataset(block: int, noise: float = 0.1, num_samples: int = 12500) Iterator[Tuple[ndarray, int]] #
Generate dataset.
- Parameters:
block (int) – block to generate samples from, must be 1, 2, 3 or 4
noise (float) – ratio of samples with a noisy class, defaults to 0.1
num_samples (int) – number of samples to generate, defaults to 12500
- Returns:
generator with the samples
- Return type:
Iterator[Tuple[np.ndarray, int]]