spotanomaly2-safe
Features
Version & License
Downloads
Quality
Testing
Scores
Status
Safety-Critical Design Goals
spotanomaly2-safe is a stateless anomaly scoring library for forecast-based anomaly detection in safety-critical production environments.
Unlike general-purpose anomaly detection frameworks, it follows a strict Safety-First architecture by design. However, users must independently verify that these features meet their specific regulatory requirements:
- Zero Side Effects: Takes DataFrames of predictions + true values, returns anomaly scores + flags as DataFrames. Zero I/O, zero config files, zero data fetching.
- Deterministic Logic: The scoring algorithms are designed to be purely mathematical and deterministic.
- Fail-Safe Operation: The system is designed to favor explicit errors over silent failures when encountering invalid data.
- EU AI Act Support: The architecture supports transparency and data governance, helping users build compliant high-risk AI components.
- Minimal Dependencies: Only numpy, pandas, scikit-learn, and scipy — no unnecessary external packages.
For a detailed technical overview of our safety mechanisms, see MODEL_CARD.md.
Installation
uv add spotanomaly2-safe
Usage
from spotanomaly2_safe import ForecastingAnomalyDetector
detector = ForecastingAnomalyDetector(
scorer_name="KMeansScorer",
scorer_params={"n_clusters": 3},
high_quantile=0.99,
normalize_scores=True,
normalization_quantile=0.99,
)
scores_df, flags_df = detector.fit_score_detect(
y_true_train=train_true_df,
y_pred_train=train_pred_df,
y_true_test=test_true_df,
y_pred_test=test_pred_df,
)
Disclaimer & Liability
IMPORTANT: This software is provided "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed.
In no event shall the authors, copyright holders, or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
The use of this software in safety-critical systems is at the sole risk of the user.
Documentation
Documentation (API) will be available at: https://sequential-parameter-optimization.github.io/spotanomaly2-safe/
Contributing
We welcome contributions to spotanomaly2-safe! Please read our CONTRIBUTING.md guide for details on:
- Development setup and coding standards
- Testing and documentation requirements
- Commit message conventions
- Pull request process
- SPDX license header requirements
License
spotanomaly2-safe software: AGPL-3.0-or-later License
Metadata
Release files for spotanomaly2-safe 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spotanomaly2_safe-0.1.0.tar.gz | 144.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spotanomaly2_safe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 176.7 kB
Release files / spotanomaly2_safe-0.1.0.tar.gz
| Download URL | spotanomaly2_safe-0.1.0.tar.gz |
|---|---|
| Size | 144.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
642952bcd7277a7f252bd023312e2ef91256b9ad58493d5a42eaba887d2e678f
|
|
BLAKE2b-256 checksum How to use checksums |
1d76acc04ffef2749ece5562f6cf2933e60600dbd4b5bd9b709d845a472a3df9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.
Transparency logRelease files / spotanomaly2_safe-0.1.0-py3-none-any.whl
| Download URL | spotanomaly2_safe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 32.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e293515feaf7b030dbb36f5deaabe6250430baeb1a15577d3979c77b70ab20a6
|
|
BLAKE2b-256 checksum How to use checksums |
a3319babd340c974596f0dc8c5a85fcd57e25c240b79b0734de6596407989b16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.
Transparency log