Metadata-Version: 2.1
Name: driftbench
Version: 0.0.12
Summary: Python tool to analyse process drifts
Home-page: 
Author: Edgar Wolf
Author-email: Edgar Wolf <edgar.wolf@hs-kempten.de>, Tobias Windisch <tobias.windisch@hs-kempten.de>
Maintainer-email: Edgar Wolf <edgar.wolf@hs-kempten.de>
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jaxlib
Requires-Dist: jax
Requires-Dist: matplotlib==3.7.2
Requires-Dist: numpy==1.24.4
Requires-Dist: pandas==2.0.3
Requires-Dist: scikit-learn==1.3.0
Requires-Dist: scipy==1.12.0
Requires-Dist: setuptools==68.1.2
Requires-Dist: torch>=1.13.1
Requires-Dist: pyyaml
Provides-Extra: cuda
Requires-Dist: jax[cuda]; extra == "cuda"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: mkdocs; extra == "dev"
Requires-Dist: mkdocs-material; extra == "dev"
Requires-Dist: mkdocstrings-python; extra == "dev"
Requires-Dist: mike; extra == "dev"

# driftbench

Benchmarking framework for generating high-dimensional synthetic drifted data and evaluating
models.

The corresponding open-access paper, [Edgar Wolf and Tobias Windisch (2025), A method to benchmark high-dimensional 
process drift detection](https://link.springer.com/article/10.1007/s10845-025-02590-9), describes the
method in detail.

To run the benchmarks, execute:

```python

python run_benchmarks.py
```


To visualize the model performance, run

```python
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np

def plot_benchmark(df):

    fig, axes = plt.subplots(ncols=3, figsize=(15, 5))
    sns.boxplot(data=df, x="TAUC", y="Detector", hue='Data',  native_scale=True, ax=axes[0])
    sns.boxplot(data=df, x="SoftTAUC", y="Detector", hue='Data', native_scale=True, ax=axes[1])
    sns.boxplot(data=df, x="AUC", y="Detector", hue='Data', native_scale=True, ax=axes[2])
    
    for ax in axes[1:]:
        ax.legend([])
        ax.set_yticklabels([])
    
    axes[0].set_xlabel('TAUC')
    axes[1].set_xlabel('sTAUC')
    axes[2].set_xlabel('AUC')
    for ax in axes:
        ax.grid()
        ax.set_ylabel('')
    fig.tight_layout()
    
    return fig

df = pd.read_json('benchmarks.json') 
fig = plot_benchmark(df)
```

## Citation
Please cite [**driftbench**](https://github.com/edgarWolf/driftbench) if you use this framework in your publications:
```bibtex
@article{wolf_method_2025,
	title = {A method to benchmark high-dimensional process drift detection},
	issn = {1572-8145},
	url = {https://doi.org/10.1007/s10845-025-02590-9},
	doi = {10.1007/s10845-025-02590-9},
	journal = {Journal of Intelligent Manufacturing},
	author = {Wolf, Edgar and Windisch, Tobias},
	year = {2025},
}
```
