4 simple customizable synthetic datasets from Chen et al., 2018 (L2X): Orange Skin, XOR, Non-linear Additive and Switch.
Project description
l2x_synthetic
Exposes synthetic dataset generation code from L2X as a pip package. To install, run:
pip install l2x-synthetic
You can now create the synthetic datasets like:
from l2x_synthetic import XORGenerator
generator = XORGenerator(n_samples=100)
X, y = generator.get_data()
Which generates new data every time you call get_data()
✨. Use random_state
to create reproducible data generation.
API
Available generators:
XORGenerator
from l2x_synthetic import XORGenerator
Orange Skin generator
from l2x_synthetic import OrangeGenerator
Non-linear additive generator
from l2x_synthetic import AdditiveGenerator
Switch generator: combines orange labels and non-linear additive
from l2x_synthetic import SwitchGenerator
Generator API
All generators are of the following type:
class l2x_synthetic.DataGenerator:
name: str = None # contains a human-friendly name for the generator.
n_samples: int = 100
random_state: Optional[int] = None
def get_data(self) -> Tuple[np.ndarray, np.ndarray]:
...
def get_dataframe(self) -> pd.DataFrame:
...
Development dependencies
pip install -r requirements.txt
About
See the original repo:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
l2x-synthetic-2.0.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for l2x_synthetic-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b505d7e569da70a4d582e6e57bb453129ce13d0e9bc8265f42b40b884c00b9 |
|
MD5 | d067febd9ca60a3da3a8dcfc438d764c |
|
BLAKE2b-256 | 6a0f184fc4e2491378b5fa257ec57bf158f15563e90a88fa27d59088a0fcff9e |