aphp / edsteva

EDS-TeVa provides a set of tools that aims at modeling the adoption over time and across space of the Electronic Health Records.
https://aphp.github.io/edsteva/latest/
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

C > 1 for note #30

Closed Aremaki closed 1 year ago

Aremaki commented 1 year ago

Check the drop duplciates

Aremaki commented 1 year ago

Bout de code pour le tets:

from edsteva.probes import ConditionProbe
import time
from loguru import logger

logger.info("Computing condition probe...")
# Compute condition probe
start = time.time()
condition_probe = ConditionProbe(completeness_predictor="per_visit_default")
condition_probe.compute(
    data=data,
    extra_data=extra_data,
    start_date="2010-01-01",
    stay_types=True,
    stay_sources=True,
    diag_types=False,
    condition_types=False,
    care_site_levels=["Hospital"],
    source_systems=["AREM", "ORBIS"],
)
end = time.time()
logger.info("Condition probe computed in {} s", end - start)
logger.info("Condition probe has shape {}", condition_probe.predictor.shape)
condition_probe.save("probe.pkl")

condition_probe.predictor[condition_probe.predictor.c > 1]