Skip to main content

Chemical Engineering Dataset Loader (CheLo) Library

License Documentation Test Status (master) CodeFactor codecov PyPI

Overview

Loading a dataset is often one of the most challenging parts of building machine learning pipelines, especially for beginners. The CheLo Library is a Python library specifically designed to make machine learning more accessible to chemical engineering students, aiding in their learning journey and supporting researchers working on related projects. By providing an easy to use framework, this library simplifies the exploration of data-driven modeling, empowering users to access, manage, and utilize chemical engineering datasets for machine learning and statistical analysis with ease. Check the CheLo's documentation for detailed usage instructions.

Key Features

  • Dataset Standardization: Unified API for accessing and exploring datasets.
  • Multiple Data Formats: Provides ready to use loaders for numpy and PyTorch.
  • Preprocessing Tools: Methods for feature/target selection, statistics, and previewing datasets.
  • Dataset Management: Automated downloading, caching, and registry of datasets.
  • Extensibility: Abstract base class for easy addition of new datasets.

Datasets

CheLo currently supports 8 datasets. You can find a list of the supported datasets here.

Installation

To install the library, run the following command:

pip install chelo

Note that for some datasets further configuration might be needed after installation (see Configuration and Dataset Path Setup).

Usage Guide

Loading a Dataset

Loading a dataset with CheLo is simple and straightforward. Just import the desired dataset (or use DatasetRegistry) and call load_data(). Note that for certain datasets, such as those hosted on Kaggle, you may need to configure the library with your access credentials beforehand.

from chelo.datasets.wine_quality import WineQualityDataset

# Instantiate the dataset
dataset = WineQualityDataset(wine_type="red", selected_features=["alcohol", "pH"], selected_targets=["quality"])

# Load data (downloads if not cached)
dataset.load_data()

# Access dataset information
info = dataset.get_dataset_info()
print("Dataset Info:", info)

Accessing Data

# Convert to numpy arrays
features, targets = dataset.to_numpy()
print("Features shape:", features.shape)
print("Targets shape:", targets.shape)

# Convert to PyTorch Dataset
pytorch_dataset = dataset.to_pytorch()
print("Number of samples in PyTorch Dataset:", len(pytorch_dataset))

Configuration

By default, the CheLo library stores datasets in the directory ~/.chelo (in the user's home directory). This default path can be customized by setting the CHELO_DATASETS_PATH environment variable. This allows you to choose a different location to store datasets and configuration files if needed.

The default dataset storage path is:

~/.chelo

Where ~ represents the user's home directory. For Windows users, the path would be:

C:\Users\<USERNAME>/.chelo

This path is used by CheLo to download, store, and manage datasets by default.

Custom API configuration

For some datasets credentials mights be needed to download datasets. The CheLo library uses a chelo.json configuration file to store such settings (this file exists under the path set in CHELO_DATASETS_PATH). If the configuration file does not exist, it will be automatically created with a default structure.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a feature branch.
  3. Implement your changes and add tests.
  4. Submit a pull request with a detailed description of your changes.

Disclaimer

I am not associated with any of the datasets provided in this library, nor do I host them. The CheLo Library solely provides tools to facilitate the downloading and loading of publicly available datasets to enhance accessibility for educational and research purposes. Users are responsible for ensuring their use complies with the datasets' licenses and terms of use. Please refer to the original dataset provider for license details. If you have any concerns, including removal requests or any other inquiries, please feel free to contact me directly.

License

This library is licensed under the MIT License. See the LICENSE file for more details.

Contact

For questions or feedback, please contact me.

Metadata

Release files for chelo 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chelo 0.0.7
File Size Uploaded Provenance
chelo-0.0.7.tar.gz 19.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chelo 0.0.7
File Interpreter ABI Platform
chelo-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 44.8 kB

Release files / chelo-0.0.7.tar.gz

Download URL chelo-0.0.7.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4aff799b409e9878dd2d964b20ce852a626943c5ab6b48d498d51f52c8964d81
BLAKE2b-256 checksum
How to use checksums
5c7505fc40109fd237c0faf86b699b080739f74e34cd42eea2dea237d39a0d5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / chelo-0.0.7-py3-none-any.whl

Download URL chelo-0.0.7-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae6bb01cce98a63a79c6f197300f1e76b74fb2371a591f9fee72c27f0f54af7c
BLAKE2b-256 checksum
How to use checksums
cf3ce658e7232d69e466e35277b580020ae1815ba4ba67bea7a7ca45c33a2de1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for chelo 0.0.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page