merlin.datasets.spiral module
- merlin.datasets.spiral.get_data(num_instances=1500, num_features=10, num_classes=3, random_seed=42)
Generate a spiral dataset inspired by the paper “Computational Advantage in Hybrid Quantum Neural Networks: Myth or Reality?” (https://arxiv.org/abs/2412.04991), generalized to support any number of spiral arms.
This function creates a dataset with multiple interleaved spirals in a high-dimensional space. Each spiral represents a different class. The first two dimensions form the base spiral pattern, while additional dimensions are created through nonlinear combinations of these base features. The noise in the data scales with the distance from the origin, making points further from the center more difficult to classify.
- Parameters:
- Returns:
Generated features, labels, and dataset metadata.
- Return type:
Notes
Dataset characteristics:
The first two dimensions form the base spiral pattern.
Additional dimensions are created through nonlinear combinations of the base features.
Noise scales with distance from the origin, making outer points harder to classify.
Multiple classes are represented by interleaved spirals.