Datasets for the master applied data science
Project description
MADS Datasets Library
This library provides the functionality to download, process, and stream several datasets.
Installation
This library has been published on PyPi and can be installed with pip, conda, pdm or poetry.
# Install with pip
pip install mads_datasets
# Install with poetry
poetry add mads_datasets
# install with pdm
pdm add mads_datasets
Data Types
Currently, it supports the following datasets:
- SUNSPOTS Time-Series data, 3000 monthly sunspot observations from 1749
- IMDB Text data, 50k movie reviews with positive and negative sentiment labels
- FLOWERS Image data, about 3000 large and complex images of 5 flowers
- FASHION MNIST Image data, 60k images sized 28x28 pixels
- GESTURES Time-Series data with x, y and z accelerometer data for 20 gestures.
- IRIS dataset, 150 observations of 4 features of 3 iris flower species
- PENGUINS dataset, an alternative to Iris with 344 penguins on multiple islands.
- FAVORITA dataset, 125 million sales records of 50k products in 54 stores.
Usage
After installation, import the necessary components:
from mads_datasets import DatasetFactoryProvider, DatasetType
You can create a specific dataset factory using the DatasetFactoryProvider
.
For instance, to create a factory for the Fashion MNIST dataset:
fashion_factory = DatasetFactoryProvider.create_factory(DatasetType.FASHION)
With the factory, you can download the data, create datasets and provide the datasets wrapped in datastreamers in one command:
streamers = mnistfactory.create_datastreamer(batchsize=32)
train = streamers["train"]
X, y = next(train.stream())
The train.stream() command wil return a generator that will yield batches of data.
You could also create a dataset directly:
dataset = fashion_factory.create_dataset()
Or download the data:
fashion_factory.download_data()
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 mads_datasets-0.3.3.tar.gz
.
File metadata
- Download URL: mads_datasets-0.3.3.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.9.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a0288528b22be558fa53a9a7051b75044d211124039e24bd17d57eaa5366dac |
|
MD5 | a68fcbe83fb013a094736271e181ae2b |
|
BLAKE2b-256 | 948370e8e271a779b748250b9f116c87f0eb6ca4b0ff42d7fbe446273400a8f9 |
File details
Details for the file mads_datasets-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: mads_datasets-0.3.3-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.9.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90850ca19d009a7a7f5942e02de48ad9b44aa61fa8630b38201a7dd8b60ebb2c |
|
MD5 | 1ceb5c99b9dc4d3214b9b7cd4fcf7a32 |
|
BLAKE2b-256 | 8e9a2ff86ed3bda793f0e97cde63ea78d82aedf7f4bdf1e147a4f2e7db24fa64 |