Description
tabular_augmentation contains some classical and novel methods used for data augmentation, making tabular data
augmentation easier, especially for few-shot learning case.
Usage
SMOTE-based methods
from tabular_augmentation import smote_augmentation
method = 'SVMSMOTE'
x_synthesis, y_synthesis = smote_augmentation(x_few_train, y_few_train, method, seed=seed,
oversample_num=100, positive_ratio=None,
knn_neighbors=3)
tabular_model_test(x_synthesis, y_synthesis, x_test, y_test, model_name='xgb')
Mixup-base methods
from tabular_augmentation import mixup_augmentation_with_weight
method = 'vanilla'
x_synthesis, y_synthesis, sample_weight = mixup_augmentation_with_weight(
x_few_train, y_few_train, oversample_num=200, alpha=1, beta=1, mixup_type=method, seed=seed, rebalanced_ita=1)
tabular_model_test(x_synthesis, y_synthesis, x_test, y_test, model_name='xgb', sample_weight=sample_weight)
CTGAN/TVAE-based methods
Methods(CTGAN/TVAE/DeltaTVAE/DiffTVAE) use sdv_synthesis function to generate synthetic data, and ConditionalTVAE use sdv_synthesis_cvae function
from tabular_augmentation import sdv_synthesis, sdv_synthesis_cvae
method = 'CTGAN'
x_synthesis, y_synthesis = sdv_synthesis(
x_few_train, y_few_train, method, oversample_num=5000,
seed=seed, init_synthesizer=True, positive_ratio=0.5,
)
tabular_model_test(x_synthesis, y_synthesis, x_test, y_test, model_name='xgb')
TabDDPM-based methods
from tabular_augmentation import ddpm_synthesis
method = "DDPM"
x_synthesis, y_synthesis = ddpm_synthesis(
x_few_train, y_few_train, method, oversample_num=5000, seed=seed, init_synthesizer=True, positive_ratio=None, train_steps=10000)
tabular_model_test(x_synthesis, y_synthesis, x_test, y_test, model_name='xgb')
Example
For details, please refer to example.ipynb
Cite
SMOTE
MIXUP
[ICLR' 18]mixup: BEYOND EMPIRICAL RISK MINIMIZATION Mixup
[ICLR' 22]Noisy Feature Mixup NoisyMixup
[ECCV' 20]Remix: Rebalanced Mixup
CTGAN/TVAE
[NIPS' 19]Modeling Tabular data using Conditional GAN CTGAN
TabDDPM
[ICML' 23] TabDDPM: Modelling Tabular Data with Diffusion Models TabDDPM
Metadata
Release files for tabular-augmentation 0.0.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tabular_augmentation-0.0.18.tar.gz | 59.8 kB | Without provenance | Details for tabular_augmentation-0.0.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tabular_augmentation-0.0.18-py3-none-any.whl | Python 3 | none | any | Details for tabular_augmentation-0.0.18-py3-none-any.whl |
Total release size: 133.4 kB
Release files / tabular_augmentation-0.0.18.tar.gz
| Download URL | tabular_augmentation-0.0.18.tar.gz |
|---|---|
| Size | 59.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe443b4c481bc5c12199783e10d580994e22e4ee57ebfe536dcd428ec13904f6
|
|
BLAKE2b-256 checksum How to use checksums |
3b00e2293b84278e2b905621e230ec2471819fa9b2e3a49407c1c534d824625d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / tabular_augmentation-0.0.18-py3-none-any.whl
| Download URL | tabular_augmentation-0.0.18-py3-none-any.whl |
|---|---|
| Size | 73.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d066325d585cd67aac99e7fa6a842253ef338f0ac5c2cebda19c0e4d248add7e
|
|
BLAKE2b-256 checksum How to use checksums |
c644e0c5f8f0412831ad53edf6393e231c58fd33c793592fb189b09d2b6ee3b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for tabular-augmentation 0.0.18
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.