{"id":16739774,"url":"https://github.com/ilias-ant/adversarial-validation","last_synced_at":"2025-04-10T13:14:07.378Z","repository":{"id":181566825,"uuid":"666773443","full_name":"ilias-ant/adversarial-validation","owner":"ilias-ant","description":"A tiny framework to perform adversarial validation of your training and test data.","archived":false,"fork":false,"pushed_at":"2025-01-13T18:29:14.000Z","size":656,"stargazers_count":20,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T00:46:52.986Z","etag":null,"topics":["adversarial-validation","data-drift","machine-learning"],"latest_commit_sha":null,"homepage":"https://advertion.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilias-ant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-15T14:28:20.000Z","updated_at":"2025-02-06T13:47:29.000Z","dependencies_parsed_at":"2023-07-16T10:10:35.748Z","dependency_job_id":null,"html_url":"https://github.com/ilias-ant/adversarial-validation","commit_stats":null,"previous_names":["ilias-ant/adversarial-validation"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilias-ant%2Fadversarial-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilias-ant%2Fadversarial-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilias-ant%2Fadversarial-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilias-ant%2Fadversarial-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilias-ant","download_url":"https://codeload.github.com/ilias-ant/adversarial-validation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225653,"owners_count":21068078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adversarial-validation","data-drift","machine-learning"],"created_at":"2024-10-13T00:53:42.465Z","updated_at":"2025-04-10T13:14:07.238Z","avatar_url":"https://github.com/ilias-ant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adversarial-validation\n\n[![PyPI](https://img.shields.io/pypi/v/advertion?color=blue\u0026label=PyPI\u0026logo=PyPI\u0026logoColor=white)](https://pypi.org/project/advertion/) \n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/advertion?logo=python\u0026logoColor=white)](https://www.python.org/)\n[![codecov](https://codecov.io/gh/ilias-ant/adversarial-validation/branch/main/graph/badge.svg?token=WXJ66ACKTA)](https://codecov.io/gh/ilias-ant/adversarial-validation)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) \n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ilias-ant/adversarial-validation/ci.yml?branch=main)](https://github.com/ilias-ant/adversarial-validation/actions/workflows/ci.yml)\n[![Documentation Status](https://readthedocs.org/projects/advertion/badge/?version=latest)](https://advertion.readthedocs.io/en/latest/?badge=latest)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/advertion?color=orange)](https://www.python.org/dev/peps/pep-0427/)\n\nA tiny framework to perform adversarial validation of your training and test data.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ilias-ant/adversarial-validation/main/static/logo.png\" width=\"95%\" text=\"figjam\"\u003e\n\n**What is adversarial validation?**\nA common workflow in machine learning projects (especially in Kaggle competitions) is:\n\n1. train your ML model in a training dataset.\n2. tune and validate your ML model in a validation dataset (typically is a discrete fraction of the training dataset).\n3. finally, assess the actual generalization ability of your ML model in a “held-out” test dataset.\n\nThis strategy is widely accepted, but it heavily relies on the assumption that the training and test datasets are drawn \nfrom the same underlying distribution. This is often referred to as the “*identically distributed*” property in the \nliterature.\n\nThis package helps you easily assert whether the \"*identically distributed*\" property holds true for your training and \ntest datasets or equivalently whether your validation dataset is a good proxy for your model's performance on the unseen \ntest instances.\n\nIf you are a person of details, feel free to take a deep dive to the following companion article:\n\n[adversarial validation: can i trust my validation dataset?](https://ilias-ant.github.io/blog/adversarial-validation/)\n\n## Install\n\nThe recommended installation is via `pip`:\n\n```bash\npip install advertion\n```\n\n(*advertion stands for **adver**sarial valida**tion***)\n\n## Usage\n\n```python\nfrom advertion import validate\n\ntrain = pd.read_csv(\"...\")\ntest = pd.read_csv(\"...\")\n\nvalidate(\n    trainset=train,\n    testset=test,\n    target=\"label\",\n)\n\n# // {\n# //     \"datasets_follow_same_distribution\": True,\n# //     'mean_roc_auc': 0.5021320833333334,\n# //     \"adversarial_features': ['id'],\n# // }\n```\n\n## How to contribute\n\nIf you wish to contribute, [this](CONTRIBUTING.md) is a great place to start!\n\n## License\n\nDistributed under the [Apache License 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filias-ant%2Fadversarial-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filias-ant%2Fadversarial-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filias-ant%2Fadversarial-validation/lists"}