Skip to main content

Data Driven SIMCA

The package ddsimca implements Data Driven SIMCA — a method for creating one-class classification (OCC) models (also known as anomaly detectors or novelty detectors). The theoretical background and practical examples for the conventional (PCA/SVD-based) DD-SIMCA method are described in this paper; please cite it when using this package. The paper is freely available via open access. Other papers describing different theoretical aspects of the method are listed in the References section below.

The paper shows all examples using the DD-SIMCA web application (mda.tools/ddsimca). This package implements the same functionality in Python, so you can obtain the same outcomes and similar plots. The package can be installed from PyPI using pip or any other package manager compatible with PyPI, e.g.:

pip install ddsimca

It requires numpy, scipy, pandas, prcv, and matplotlib, which will be installed automatically as dependencies.

Since v. 1.1.0 the package also provides two methods for 3-way (multi-mode) data — ddsimca_parafac and ddsimca_tucker. Their theoretical background is described in this paper.

These two methods rely on an additional library, tensorly, which is not installed by the standard pip install ddsimca command shown above. If you plan to use the 3-way methods, run this instead:

pip install ddsimca[3way]

This installs everything from the standard ddsimca plus tensorly in one step. If you already have ddsimca installed and only want to add 3-way support, run pip install tensorly separately.

Getting started

Use the Jupyter notebook demo.ipynb to get started with the conventional PCA-based DD-SIMCA. To run the examples in this notebook you need to download a zip file with the datasets (the same dataset is used to illustrate the method in the paper). Here is a direct link to the archive.

Simply download the dataset, unzip it to the same directory as the notebook, and follow the guidelines. The dataset can also be downloaded from GitHub.

For 3-way DD-SIMCA, use the Jupyter notebook demo_3way.ipynb. It assumes you already know how conventional DD-SIMCA works. The dataset for this notebook can be downloaded from here. It is a MATLAB data file (.mat) with simulated data, kindly prepared and shared by Alejandro Olivieri. The notebook explains how to load the data.

Both notebooks are also available as PDF files with all plots and outputs: demo.pdf and demo_3way.pdf

Releases

1.1.0 (12/6/2026)

  • added support for custom colors and markers in plotAcceptance() and plotDistance().
  • added support for showing log-transformed values in plotDistance().
  • added ddsimca_parafac variant for 3-way (multi-mode) data based on PARAFAC decomposition.
  • added ddsimca_tucker variant for 3-way (multi-mode) data based on Tucker decomposition.
  • added demo_3way.ipynb Jupyter notebook with a user guide for the 3-way methods.

1.0.3 (6/1/2026)

  • small improvements to code.
  • better documentation text.

1.0.2 (1/1/2026)

  • initial release

References

  1. S. Kucheryavskiy, O. Rodionova, A. Pomerantsev. A comprehensive tutorial on Data-Driven SIMCA: Theory and implementation in web. Journal of Chemometrics, 38 (7), 2024. DOI: 10.1002/cem.3556.

  2. A. Pomerantsev, O. Rodionova. Selectivity in Nontargeted Qualitative Analysis. Analytica Chimica Acta, 1332, 2024. DOI: 10.1016/j.aca.2024.343352.

  3. A. Pomerantsev, O. Rodionova. Popular decision rules in SIMCA: Critical review. Journal of Chemometrics, 34 (8), 2020. DOI: 10.1002/cem.3250

  4. A. Pomerantsev, O. Rodionova. On the type II error in SIMCA method. Journal of Chemometrics, 28 (6), 2014. DOI: 10.1002/cem.2610.

  5. A. P. Pagani, G. Camargo, G. A. Ibañez, A. C. Olivieri, A. L. Pomerantsev, O. Ye. Rodionova. Data-Driven Version of Multiway Soft Independent Modeling of Class Analogy (N-Way DD-SIMCA): Theory and Application. Analytical Chemistry, 96 (12), 2024. DOI: 10.1021/acs.analchem.3c05096.

Metadata

Release files for ddsimca 1.1.0

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

Source distribution (sdist)

Source distribution for ddsimca 1.1.0
File Size Uploaded
ddsimca-1.1.0.tar.gz 7.7 MB Details

Built distribution (wheel)

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

Total release size: 7.8 MB

Release files / ddsimca-1.1.0.tar.gz

Download URL ddsimca-1.1.0.tar.gz
Size 7.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e5c5d46a00b535f971abd1ec9157f81b4e4898de75edf5428b60c70f65d1fe3e
BLAKE2b-256 checksum
How to use checksums
f935319ddbcedc55df943dea7744ff51d26ff52bce1753eacd441f18acd03566
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / ddsimca-1.1.0-py3-none-any.whl

Download URL ddsimca-1.1.0-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a1cd27da53c6dcda21533237b9b4dbd316558f181ff9b1a6a5b103e6e80abb9
BLAKE2b-256 checksum
How to use checksums
b90458a3c4b14bf24c853e4737dd7bc72263ba16ad48688107ac3ff572a764c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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