Files
models/pyproject.toml
T
rockdrigo acc8c371bc CaMa survival: the SEER interval-survival pipeline as a scenario with population results
models/cama/seer_survival is the SEER survival pipeline as Hamilton dataflows, with the interval LR and network keeping
their per-interval fits and surviving an interval without deaths. models/cama/survival is the scenario: it indexes the
total cohort at the first invasive biopsy report (steps/indexing.py), derives the covariates and the outcome from the
cohort's events, fits the interval survival, writes the five routines and publishes the population curves
(analisis/curvas.json) with the version. An estimate may carry the model's own index date.
2026-11-21 02:07:34 -06:00

83 lines
2.5 KiB
TOML

[project]
name = "models"
version = "0.1.0"
description = "train()/predict() interfaces for the CaCu, CaMa and TEA screening models."
requires-python = ">=3.12"
dependencies = [
"persistance",
"extraction",
"mlflow>=2.9",
# The model DAGs (`models/pipelines`): each function a node, each parameter an edge.
"apache-hamilton>=1.90",
# Cohort builds are Parquet files, read and written as frames.
"pandas>=2.0",
"pyarrow>=15",
"scikit-learn>=1.4",
# The values of the cohort and estimate files (`models.io.contracts`).
"pandera>=0.20",
"tea",
]
[project.optional-dependencies]
# Reading the EEG baselines' reference cohort from the cluster's S3 (`models.tea.eeg.train`).
eeg-reference = ["tea[s3]"]
# Running uploaded notebooks without Quarto (models.reports.rendering.JupyterRenderer, models.reports.experiment).
notebooks = [
"nbclient>=0.10",
"nbconvert>=7.16",
"ipykernel>=6.29",
]
# The SEER survival pipeline (`models.cama.seer_survival`): statsmodels for the logistic regressions, pgmpy for the
# Bayesian network, mpmath for the fractional Weibull's series, matplotlib for its figures. `dcurves` is optional: without
# it the decision-curve figure is skipped.
seer-survival = [
"scipy>=1.11",
"statsmodels>=0.14",
"pgmpy>=1.0",
"networkx>=3.0",
"mpmath>=1.3",
"matplotlib>=3.8",
]
# The population curves of a CaMa training run (`models.cama.survival.population`): the fractional Weibull's series.
survival-curves = [
"scipy>=1.11",
"mpmath>=1.3",
]
seer-survival-dca = ["dcurves>=1.1"]
[tool.uv.sources]
persistance = { path = "../Persistance", editable = true }
extraction = { path = "../Extraction", editable = true }
tea = { path = "libs/tea", editable = true }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["models"]
exclude = ["**/notebooks", "**/experiments"]
[dependency-groups]
dev = [
"pytest>=8.0.0",
"reportlab>=4.0",
# the SEER survival pipeline's tests (the `seer-survival` extra)
"scipy>=1.11",
"statsmodels>=0.14",
"pgmpy>=1.0",
"networkx>=3.0",
"mpmath>=1.3",
"matplotlib>=3.8",
"nbclient>=0.10",
"nbconvert>=7.16",
"ipykernel>=6.29",
]
# The scenarios' notebooks (`<scenario>/notebooks/`): a Jupyter kernel and the drawing of the Hamilton DAGs.
# `graphviz` is only the Python side: drawing also needs Graphviz's `dot` program on the machine.
notebooks = [
"ipykernel>=6.29",
"graphviz>=0.20",
]