chemotools: A Python Package that Integrates Chemometrics and scikit-learn
Project description
chemotools
chemotools is a Python library that brings chemometric preprocessing tools into the scikit-learn ecosystem.
It provides modular transformers for spectral data, designed to plug seamlessly into your ML workflows.
Features
- Preprocessing for spectral data (baseline correction, smoothing, scaling, derivatization, scatter correction).
- Fully compatible with
scikit-learnpipelines and transformers. - Simple, modular API for flexible workflows.
- Open-source, actively maintained, and published on PyPI and Conda.
Installation
Install from PyPI:
pip install chemotools
Install from Conda:
conda install -c conda-forge chemotools
Usage
Example: preprocessing pipeline with scikit-learn:
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
from chemotools.baseline import AirPls
from chemotools.scatter import MultiplicativeScatterCorrection
preprocessing = make_pipeline(
AirPls(),
MultiplicativeScatterCorrection(),
StandardScaler(with_std=False),
)
spectra_transformed = preprocessing.fit_transform(spectra)
➡️ See the documentation for full details.
Development
This project uses uv for dependency management and Task to simplify common development workflows. You can get started quickly by using the predefined Taskfile, which provides handy shortcuts such as:
task install # install all dependencies
task check # run formatting, linting, typing, and tests
task coverage # run tests with coverage reporting
task build # build the package for distribution
Contributing
Contributions are welcome! Check out the contributing guide and the project board.
License
Released under the MIT License.
Compliance and Software Supply Chain Management
This project embraces software supply chain transparency by generating an SBOM (Software Bill of Materials) for all dependencies. SBOMs help organizations, including those in regulated industries, track open-source components, ensure compliance, and manage security risks.
The SBOM file is made public as an asset attached to every release. It is generated using CycloneDX SBOM generator for Python, and can be vsualized in tools like CycloneDX Sunshine.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chemotools-0.2.5.tar.gz.
File metadata
- Download URL: chemotools-0.2.5.tar.gz
- Upload date:
- Size: 37.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c68f27d7db3c5d5974a74650f5d85b63ab78a24d94b5f53d4c39f84e31930a1e
|
|
| MD5 |
8866b6ed572d70abc34ec68ac01ae409
|
|
| BLAKE2b-256 |
cc5b4b50ba334dfe9b1bd7f29a203d48235565b2d5e84aa72afaffd0c25f4220
|
Provenance
The following attestation bundles were made for chemotools-0.2.5.tar.gz:
Publisher:
python-release.yml on paucablop/chemotools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chemotools-0.2.5.tar.gz -
Subject digest:
c68f27d7db3c5d5974a74650f5d85b63ab78a24d94b5f53d4c39f84e31930a1e - Sigstore transparency entry: 764595282
- Sigstore integration time:
-
Permalink:
paucablop/chemotools@33a47583d7576667f9fa90c0441b4fa784e61c1a -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/paucablop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@33a47583d7576667f9fa90c0441b4fa784e61c1a -
Trigger Event:
release
-
Statement type:
File details
Details for the file chemotools-0.2.5-py3-none-any.whl.
File metadata
- Download URL: chemotools-0.2.5-py3-none-any.whl
- Upload date:
- Size: 7.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5525eea08cadb3140f2d795ce578d2679684550fc47182aa0452230ece9de8bb
|
|
| MD5 |
ec41eaba3b59b7419e53b5b8ab6f89d9
|
|
| BLAKE2b-256 |
1bb532082e86a4495c0e3962bcf2beefc2bd3c2dea12a75728322a3cd9d1ebf7
|
Provenance
The following attestation bundles were made for chemotools-0.2.5-py3-none-any.whl:
Publisher:
python-release.yml on paucablop/chemotools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chemotools-0.2.5-py3-none-any.whl -
Subject digest:
5525eea08cadb3140f2d795ce578d2679684550fc47182aa0452230ece9de8bb - Sigstore transparency entry: 764595285
- Sigstore integration time:
-
Permalink:
paucablop/chemotools@33a47583d7576667f9fa90c0441b4fa784e61c1a -
Branch / Tag:
refs/tags/v0.2.5 - Owner: https://github.com/paucablop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@33a47583d7576667f9fa90c0441b4fa784e61c1a -
Trigger Event:
release
-
Statement type: