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
Built Distribution
File details
Details for the file l2x-synthetic-2.0.1.tar.gz
.
File metadata
- Download URL: l2x-synthetic-2.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20c143c206ad91292134d0ad2630d4b28f366229296c0f8942097b2b0859dbce |
|
MD5 | 70314c2dcdca2be7e2e34798d8185aa3 |
|
BLAKE2b-256 | 7d0b24f3175394ec85b31da540ad8a8a515b35c56a80d37341a7c3aa4e44a0d6 |
File details
Details for the file l2x_synthetic-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: l2x_synthetic-2.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51e677b9055f72f9d3b7e0327472aa668ffb73e6b6d7b3bd3a3f3605b1eda4e6 |
|
MD5 | 1a36b2cdeff6a9e916f24b5686b0628c |
|
BLAKE2b-256 | 64d0d1a5a4308788e830606e7e32d00635fda7ba01784edefc57b7f36475a092 |