Metadata-Version: 2.4
Name: adadmire
Version: 1.0.15
Summary: Functions for detecting anomalies in tabular datasets using Mixed Graphical Models.
Project-URL: Homepage, https://github.com/spang-lab/adadmire
Project-URL: Documentation, https://spang-lab.github.io/adadmire/
Project-URL: Bug Tracker, https://github.com/spang-lab/adadmire/issues
Author-email: Lena Buck <lena.buck@ukr.de>, Tobias Schmidt <tobias2.schmidt@ukr.de>
License-Expression: MIT
License-File: LICENSE
Keywords: anomaly detection,imputation,metabolomics,mixed graphical model
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.9
Requires-Dist: numpy>=1.20
Requires-Dist: scikit-learn>=1
Requires-Dist: scipy>=1
Provides-Extra: plot
Requires-Dist: matplotlib; extra == 'plot'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: pytest-xdist; extra == 'test'
Description-Content-Type: text/markdown

[![Unit Tests](https://github.com/spang-lab/adadmire/actions/workflows/unit-tests.yml/badge.svg?branch=main)](https://github.com/spang-lab/adadmire/actions/workflows/unit-tests.yml)
[![Code Coverage](https://img.shields.io/codecov/c/github/spang-lab/adadmire?label=Code%20Coverage)](https://app.codecov.io/gh/spang-lab/adadmire?branch=main)
[![PyPI Version](https://img.shields.io/pypi/v/adadmire.svg?label=PyPI%20Version)](https://pypi.org/project/adadmire/)
[![Python Versions](https://img.shields.io/pypi/pyversions/adadmire.svg?label=Python)](https://pypi.org/project/adadmire/)
[![PyPI Downloads](https://static.pepy.tech/badge/adadmire/month)](https://pepy.tech/project/adadmire)

# adadmire

<!-- ATTENTION: this file is displayed not only on GitHub, but also on PyPI, so no links relative to files in the repo must be used -->

Functions for detecting anomalies in molecular data sets using Mixed Graphical Models.

## Installation

Enter the following commands in a shell like *bash*, *zsh* or *powershell*:

```bash
pip install -U adadmire
```

## Usage

The usage example in this section requires that you first download the data files from the [data](https://github.com/spang-lab/adadmire/tree/main/data) folder. For a description of the contents of this folder, see section [Data](https://spang-lab.github.io/adadmire/usage.html#data) of the adadmire documentation site.

```python
from adadmire import admire, penalty
import numpy as np

# Load example data
X = np.load('data/Feist_et_al/scaled_data_raw.npy') # continuous data
D = np.load('data/Feist_et_al/pheno.npy') # discrete data
levels = np.load('data/Feist_et_al/levels.npy') # levels of discrete variables

# Define lambda sequence of penalty values
lam = penalty(X, D, min= -2.25, max = -1.5, step =0.25)

# Get anomalies in continuous and discrete data
X_cor, n_cont, position_cont, D_cor, n_disc, position_disc = admire(X, D, levels, lam)
print(X_cor) # corrected X
print(n_cont) # number of continuous anomalies
print(position_cont) # position in X
print(D_cor) # corrected D
print(n_disc) # number of discrete anomalies
print(position_disc) # position in D
```

You can find more usage examples in the [Usage](https://spang-lab.github.io/adadmire/usage.html) section of adadmire's documentation site.

## Documentation

You can find the full documentation for adadmire at [spang-lab.github.io/adadmire](https://spang-lab.github.io/adadmire/). Amongst others, it includes chapters about:

- [Installation](https://spang-lab.github.io/adadmire/installation.html)
- [Usage](https://spang-lab.github.io/adadmire/usage.html)
- [Modules](https://spang-lab.github.io/adadmire/modules.html)
- [Contributing](https://spang-lab.github.io/adadmire/contributing.html)
- [Testing](https://spang-lab.github.io/adadmire/testing.html)
- [Documentation](https://spang-lab.github.io/adadmire/documentation.html)
