Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
3497ff3
Add .gitignore
dcajal Mar 2, 2026
3fd3769
Add AUTHORS.txt with contributor names and affiliations
dcajal Mar 2, 2026
2952aa1
Add models from previous challenges
dcajal Mar 2, 2026
1aaa8f0
Add some processing scripts and methods
dcajal Mar 2, 2026
02a8229
Visual noise corrected
dcajal Mar 2, 2026
0484d8a
Refactor
dcajal Mar 3, 2026
9a73d0d
Add scripts for creating and managing smoke training datasets
dcajal Mar 3, 2026
de17158
Add documentation for project overview, Docker usage, smoke dataset, …
dcajal Mar 3, 2026
fb6216c
Add .dockerignore file to exclude datasets, artifacts, and OS/IDE files
dcajal Mar 3, 2026
689fd97
Update .gitignore to include datasets, model artifacts, and output di…
dcajal Mar 3, 2026
d3a10db
Fix paths for smoke dataset training in documentation
dcajal Mar 3, 2026
2f63033
Add progress bar functionality and print filtering for model execution
dcajal Mar 3, 2026
5e05482
Update run script and documentation to include new commands for devel…
dcajal Mar 3, 2026
4d080a1
Add unified run script with commands for building, training, and runn…
dcajal Mar 3, 2026
a2a52f3
Add note for PowerShell script execution policy in run script documen…
dcajal Mar 3, 2026
ec74b58
Add bash run script and create smoke dataset script for model trainin…
dcajal Mar 3, 2026
67d9b63
Update Docker and smoke dataset documentation for clarity and structure
dcajal Mar 3, 2026
819ca18
Refactor Docker commands in run script for improved path handling and…
dcajal Mar 3, 2026
1ebe7a8
Move lolai_models to src
dcajal Mar 3, 2026
b7cc2ea
Add evaluation commands for existing predictions in run scripts and d…
dcajal Mar 9, 2026
f70efc1
Merge pull request #1 from physionetchallenges/main
dcajal Mar 25, 2026
03fc272
Refactor dataset handling in run scripts to support supplementary dat…
dcajal Mar 27, 2026
922c109
Update run scripts to replace references from supplementary_set to te…
dcajal Mar 27, 2026
ebe970c
Add optimization tracking documentation and improve training performa…
dcajal Mar 27, 2026
8f121b7
Refactor respiratory processing to improve signal handling and featur…
rolopu1 Mar 27, 2026
de1a5cf
Cambio de tipo de datos a np.array y concatenar features
rolopu1 Mar 27, 2026
6ea8ddf
Añadir ficheros Sofia
rolopu1 Mar 27, 2026
14e0672
Fix import errors
dcajal Mar 27, 2026
6c4f780
Bypass CPAP
rolopu1 Mar 27, 2026
4fe3992
Correccion EEG
rolopu1 Mar 27, 2026
7bf2500
Update smoke dataset configuration to use 10 subjects by default and …
dcajal Mar 27, 2026
a550325
Update smoke dataset configuration to use 5 subjects by default and e…
dcajal Mar 27, 2026
ca1f9e6
Update smoke dataset configuration to use 5 subjects by default
dcajal Mar 27, 2026
e1cc32e
Refactor EEG and respiratory signal processing functions to enhance f…
dcajal Mar 27, 2026
616a1b8
Update openECGfunction.py
sromagnoli-10 Mar 28, 2026
30e2369
Update team_code.py
sromagnoli-10 Mar 28, 2026
fe8e28b
Update team_code.py
sromagnoli-10 Mar 28, 2026
112aae0
Fix invalid value encounteres in sacalar divide
dcajal Mar 28, 2026
112d75a
Merge branch 'main' of github.com:BSICoS/python-example-2026
dcajal Mar 28, 2026
866d466
creating ECG processing branch, changing folder of two functions and …
sromagnoli-10 Mar 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Datasets
data/
**/training_set/
**/supplementary_set/
**/*.edf

# Artifacts
model/
model_smoke/
model_full_smoke/
outputs/
outputs_smoke/
__pycache__/
*.pyc
*.pkl
*.sav
*.joblib

# OS / IDE
.DS_Store
Thumbs.db
.vscode/
.idea/
238 changes: 238 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
# Dataset
data/

# Model artifacts
model/
model_smoke/
*.pkl
*.sav
*.joblib

# Outputs
outputs/
outputs_smoke/

# Python
__pycache__/
*.pyc

# OS
.DS_Store
Thumbs.db

# IDE
.vscode/
.idea/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/
graphs/

graphs
# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Cursor
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
# refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/
results_summaryEEG_I0002.csv
results_summaryEEG_I0004.csv
results_summaryEEG_I0006.csv
results_summaryEEG_I0007.csv
4 changes: 4 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sofia Romagnoli - Universidad de Zaragoza
Diego Cajal - CIBER-BBN
Josseline Madrid - Universidad de Zaragoza
Rodrigo Lozano - Universidad de Zaragoza
35 changes: 35 additions & 0 deletions docs/01_overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# CINC 2026 – Visión General del Proyecto

Estamos participando en el Challenge 2026 de Computing in Cardiology.

El objetivo es predecir deterioro cognitivo a partir de datos de polisomnografía (PSG).

## Cómo nos evaluarán

La organización:

1. Construirá nuestra imagen Docker.
2. Ejecutará `train_model.py`.
3. Ejecutará `run_model.py`.
4. Evaluará las predicciones generadas.

Por tanto, la reproducibilidad mediante Docker es obligatoria.

Nuestro objetivo es garantizar que:
- El código se ejecuta sin intervención manual.
- El modelo se entrena correctamente.
- Las predicciones se generan en el formato requerido.

## Qué se puede modificar y qué no

❌ No modificar

- `train_model.py`
- `run_model.py`
- `helper_code.py`
- `evaluate_model.py`

✅ Modificar/Añadir

- `team_code.py` <-- Toda la lógica científica y de modelado debe implementarse ahí.
- Helpers, scripts, métodos: añadir a voluntad en `src/`
46 changes: 46 additions & 0 deletions docs/02_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Uso de Docker

Este documento define el contexto de ejecución con Docker.

## Requisitos

- Docker Desktop instalado (modo Linux containers)
- Dataset descargado desde Kaggle
- Dataset completo disponible en `data/training_set/` (ruta por defecto del proyecto)

Si tu dataset está en otra ubicación, actualiza la variable de ruta en el script de ejecución.

## Estructura de trabajo

Entradas:

- `data/training_set/` (dataset completo)
- `data/training_smoke/` (dataset reducido para modo desarrollo (smoke))

Salidas:

- `model/` y `outputs/` (flujo completo)
- `model_smoke/` y `outputs_smoke/` (flujo smoke/desarrollo)

## Orden recomendado de ejecución

1. Construir imagen Docker (`build`)
2. Preparar dataset smoke (`smoke`)
3. Iterar en modo desarrollo (smoke) (`train-dev` / `run-dev`)
4. Ejecutar validación completa (`train` / `run`)
5. Limpiar artefactos cuando corresponda (`clean`)

La guía paso a paso está en `docs/04_run_script.md`.

## Compatibilidad de scripts

El flujo principal del equipo está documentado con `run.sh` (Git Bash).
También existen equivalentes en PowerShell: `run.ps1` y `scripts/create_smoke.ps1`.

## Resultado esperado

Tras ejecutar la generación de predicciones (inferencia) completa, en `outputs/` se genera un `demographics.csv` con:

- Columnas originales
- `Cognitive_Impairment`
- `Cognitive_Impairment_Probability`
41 changes: 41 additions & 0 deletions docs/03_smoke_dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Dataset smoke (Modo desarrollo)

Entrenar con el dataset completo tarda aproximadamente 30–40 minutos con el modelo de ejemplo.

Para desarrollo utilizamos un dataset reducido (5 sujetos por defecto).

Este documento describe cuándo y por qué usar smoke.
Los comandos de ejecución están centralizados en `docs/04_run_script.md`.

---

## Qué incluye

- Muestra reducida del dataset (5 sujetos por defecto)
- Estructura compatible con el flujo oficial del proyecto
- Directorio de salida en `data/training_smoke/`
- `demographics.csv` filtrado para que solo incluya los registros copiados al smoke

## Para qué se usa

- Validar cambios de código rápidamente
- Detectar errores de integración antes del entrenamiento completo
- Iterar en modo desarrollo (smoke) sin esperar ciclos largos

## Artefactos asociados

- Entrenamiento smoke: `model_smoke/`
- Predicciones (inferencia) smoke: `outputs_smoke/`

## Relación con el flujo principal

El dataset smoke se crea al inicio del ciclo de desarrollo y se usa junto con `train-dev` y `run-dev`.
El orden detallado de ejecución está en `docs/04_run_script.md`.

## ¿Cuándo usar smoke?

- Desarrollo de nuevas funcionalidades
- Comprobación rápida de que el código no rompe
- Validación de cambios en `team_code.py`

Nunca usar smoke para evaluar rendimiento final.
Loading