Adversarial test: simple way to know if your train data and test data are similar
We combine our train and test data, labeling them 0 for the training data and 1 for the test data, mix them up, then see if we are able to correctly re-identify them using a binary classifier.
If a classifier can identify whether a sample comes from train or test data set, we know that there's at least one feature in your data is shifted; use feature importance methods to point out the shifted feature(s)
Get Started and Documentation
To install from pip:
pip install adversarial-test
Code example:
- Using adversarial test with category features
- See more usages in notebooks directory
Metadata
Release files for adversarial-test 0.1.4
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 | |
|---|---|---|---|---|
| adversarial-test-0.1.4.tar.gz | 3.0 kB | Without provenance | Details |
Release files / adversarial-test-0.1.4.tar.gz
| Download URL | adversarial-test-0.1.4.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b65fd4e19dd9a58c9376c6855693368db229cff7710f39a1821d0edefc19f72
|
|
BLAKE2b-256 checksum How to use checksums |
d7f210b4d8d8758f619ea56f0c7398fbf28cc2cbe78af8b6b6d1964dfcfda2e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for adversarial-test 0.1.4
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.