Implementation of Data Driven SIMCA one class classification method
Project description
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()andplotDistance(). - added support for showing log-transformed values in
plotDistance(). - added
ddsimca_parafacvariant for 3-way (multi-mode) data based on PARAFAC decomposition. - added
ddsimca_tuckervariant for 3-way (multi-mode) data based on Tucker decomposition. - added
demo_3way.ipynbJupyter 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
-
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.
-
A. Pomerantsev, O. Rodionova. Selectivity in Nontargeted Qualitative Analysis. Analytica Chimica Acta, 1332, 2024. DOI: 10.1016/j.aca.2024.343352.
-
A. Pomerantsev, O. Rodionova. Popular decision rules in SIMCA: Critical review. Journal of Chemometrics, 34 (8), 2020. DOI: 10.1002/cem.3250
-
A. Pomerantsev, O. Rodionova. On the type II error in SIMCA method. Journal of Chemometrics, 28 (6), 2014. DOI: 10.1002/cem.2610.
-
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.
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
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 ddsimca-1.1.0.tar.gz.
File metadata
- Download URL: ddsimca-1.1.0.tar.gz
- Upload date:
- Size: 7.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5c5d46a00b535f971abd1ec9157f81b4e4898de75edf5428b60c70f65d1fe3e
|
|
| MD5 |
ec5466598257e4b87b1bc2f6a90cceab
|
|
| BLAKE2b-256 |
f935319ddbcedc55df943dea7744ff51d26ff52bce1753eacd441f18acd03566
|
File details
Details for the file ddsimca-1.1.0-py3-none-any.whl.
File metadata
- Download URL: ddsimca-1.1.0-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1cd27da53c6dcda21533237b9b4dbd316558f181ff9b1a6a5b103e6e80abb9
|
|
| MD5 |
190c343bc3cfb68ee24beb0efec4ecfe
|
|
| BLAKE2b-256 |
b90458a3c4b14bf24c853e4737dd7bc72263ba16ad48688107ac3ff572a764c3
|