Skip to main content

package for chemometric data analysis

Project description

codecov Documentation Status

chemometrics

chemometrics is a free and open source library for visualization, modeling, and prediction of multivariate data.

The package streamlines chemometric workflows by providing powerful preprocessing algorithms combined with simple functional calls for generating fully calibrated chemometric models. A variety of analytical visualizations help to understand the data and build trust into the generated models. Looking for further extending the models? chemometrics is fully compatible with scikit-learn. Use advanced machine learning algorithms to get most out of your data.

The documentation is hosted at https://chemometrics.readthedocs.io

Installation

chemometrics is distributed over PyPI. The simplest way to install chemometrics is by running

python -m pip install chemometrics

Example applications

Plotting with reference coloring:

import numpy as np
import matplotlib.pyplot as plt
import chemometrics as cm

plt.figure(figsize=[12, 5])
lines = cm.plot_colored_series(D.T, x=wavenumbers, reference=C[:, 1])
plt.xlabel(r'Wavenumber / $\mathrm{cm^{-1}}$')
plt.ylabel('Intensity / AU')

spectra

Preprocessing by smoothing and performing a second derivative:

X_deriv = cm.Whittaker(constraint_order=3, deriv=2).fit_transform(X)
cm.plot_colored_series(X_deriv.T, reference=Y)
plt.xlabel('Wavenumber / nm')
plt.ylabel('$d^2A/dl^2$ / $mAU/nm^2$')

derived spectra

A working PLS model is just one function call away:

cm.fit_pls(X_deriv, Y)

CV scores PLS analytics

Interested in more? Check out following pages:

Requirements

  • Python >= 3.8
  • NumPy >= 1.19.2
  • SciPy >= 1.5.2
  • scikit-learn >= 0.23.2
  • matplotlib >= 3.3.2

Earlier versions of the required libraries may work but have not been tested.

Copyright and license

chemometrics is released under GPLv3.

Copyright 2021, 2022 Matthias Rüdt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chemometrics-0.4.0.tar.gz (62.0 kB view hashes)

Uploaded Source

Built Distribution

chemometrics-0.4.0-py3-none-any.whl (81.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page