adult-dataset
A PyTorch dataset wrapper for the Adult (Census Income) dataset. Adult is a popular dataset in machine learning fairness research.
This package provides the adult.Adult class:
atorch.utils.data.Datasets loading and, optionally, downloading the
Adult dataset.
It can be used like the MNIST dataset in
torchvision.
Beyond adult.Adult, this package also provides adult.AdultRaw,
which works just as adult.Adult, but
does not standardize the features in the dataset and does not apply one-hot encoding.
Installation
pip install adult-dataset
Basic Usage
from adult import Adult
# load (if necessary, download) the Adult training dataset
train_set = Adult(root="datasets", download=True)
# load the test set
test_set = Adult(root="datasets", train=False, download=True)
inputs, target = train_set[0] # retrieve the first sample of the training set
# iterate over the training set
for inputs, target in iter(train_set):
... # Do something with a single sample
# use a PyTorch data loader
from torch.utils.data import DataLoader
loader = DataLoader(test_set, batch_size=32, shuffle=True)
for epoch in range(100):
for inputs, targets in iter(loader):
... # Do something with a batch of samples
Advanced Usage
Turn off status messages while downloading the dataset:
Adult(root=..., output_fn=None)
Use the logging module for logging status messages while downloading the
dataset instead of placing the status messages on sys.stdout.
import logging
Adult(root=..., output_fn=logging.info)
Metadata
Release files for adult-dataset 3.0.0
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 |
|---|---|---|---|---|
| adult_dataset-3.0.0.tar.gz | 11.1 kB | Without provenance | Details for adult_dataset-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adult_dataset-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for adult_dataset-3.0.0-py3-none-any.whl |
Total release size: 20.0 kB
Release files / adult_dataset-3.0.0.tar.gz
| Download URL | adult_dataset-3.0.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff1822a4c3b7c8fa9e1be9bf9055f372127eb79d68131abc7167017ae94f31e0
|
|
BLAKE2b-256 checksum How to use checksums |
03651e1491346966603f5c23f7ae3c8a0d87e695fae1e2d7967853763442b0b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Release files / adult_dataset-3.0.0-py3-none-any.whl
| Download URL | adult_dataset-3.0.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d711c0ce7cd1b07c7c02f6c7e14b8603bed0ec173ca4e3b7c20cca1fb4a0ba2
|
|
BLAKE2b-256 checksum How to use checksums |
358242bdf580e63e70c68c7c6f6c027cb6a49ceca128521750041fda9a11ed41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.31.0
|
Security for adult-dataset 3.0.0
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.