Metadata-Version: 2.4
Name: mmaing_aesop
Version: 0.2.0
Summary: Mixed Model of Artificial Intelligence and Next-Generation for outbreak detection.
Author-email: Dérick Borges <derick.gabriel@ufba.br>
License: Apache-2.0
Project-URL: Homepage, https://pypi.org/project/mmaing_aesop/
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: scikit-learn
Requires-Dist: pyod
Requires-Dist: matplotlib
Requires-Dist: scipy

# MMAING-AESOP

**MMAING-AESOP** it is an early outbreak detection model based on the combination of:

- Rt (Time-Dependent Reproduction Number - NGM)
- Ensemble of Machine Learning models (Isolation Forest, LOF, OCSVM, COPOD)

The model generates *Early Warning Signals* (EWS) based on weekly primary care time series.

If you use MMAING-AESOP in your research, please cite:

Borges, D.G.F., Coutinho, E.R., Cerqueira-Silva, T. et al. Combining machine learning and dynamic system techniques to early detection of respiratory outbreaks in routinely collected primary healthcare records. BMC Med Res Methodol 25, 99 (2025). https://doi.org/10.1186/s12874-025-02542-0

---
## Installation and usage

The mmaing_aesop package is available on PyPi. To install it, use the following command:

```bash
pip install mmaing_aesop

After installation, you can import the package in your Python script with:

```bash
from mmaing_aesop import MMAING


## Example

```modelo = MMAING(
    #enseble
    vote_threshold=3,
    #outlies
    contamination=0.4,
    #rt
    limiar_rt=1.25,
    window_rt=5,
    gamma=0.2,
    #limites 
    alpha=0.05,
    window_limit=5,
    baseline_years=[2017, 2018, 2019],
    start_year_detection=2020

)
modelo.fit(df_real[df_real['co_ibge'] == xxxxxx])
modelo.plot(co_ibge=xxxxxx)
