Python toolkit implementing the Redox Disturbance Index, first iteration (RDIv1) — a composite quantitative descriptor that integrates multiple redox-related biochemical parameters into a single score for comparative analysis of cellular redox dynamics across experiments, treatments, and datasets.
The current implementation is based on the fifth and final internal training iteration of the underlying ElasticNet model conducted during development. For this reason, several script and data filenames carry the suffix _v5 as a development artifact; the index itself, as published, is RDIv1. Future versions of the index (RDIv2 onward) will incorporate additional redox modules and biological contexts in subsequent releases of this package.
This repository contains the core scripts, AI-derived weights, and utilities supporting RDIv1.
Purpose: Normalizes raw redox measurements (superoxide, nitrites, H₂O₂, GSH, GSSG) on a 0–1 scale per viable cell. No machine learning — deterministic preprocessing.
Output: redox_data_normalized.csv
Purpose: Learns feature weights using ElasticNetCV, PolynomialFeatures and GroupKFold validation. This is the core AI model behind RDIv1 (5th internal training iteration).
Output files:
ai_learned_weights_v5.csvRDI_AI_v5_vs_Viability.pngfeature_importance_v5_rf.pngai_weight_distribution_v5.pngv5_cv_scores.txt
Purpose:
Generates the final RDIv1 score and RDI_v5_score_0_100 using:
- normalized CSV
- AI-derived weights
Features:
- single + interaction terms
- automatic orientation (higher RDI = lower viability)
- robust scaling (percentiles 5–95)
- quick-start mode
Output: redox_data_with_RDI_v5.csv
Purpose: Visual verification of RDIv1 results.
Generates:
- histogram
- RDI vs viability scatter (R² + Pearson)
- time-course or concentration plots
Stored means and standard deviations used during development of RDIv1 (5th internal training iteration).
Final machine-learned weights used for RDIv1 computation (5th internal training iteration).
RedoxAI-RDI/
│
├─ scripts/
│ (all python scripts + model files)
│
├─ data/
│ example_input.csv (optional)
│
├─ README.md
└─ requirements.txt
Python: 3.10+ recommended
Libraries:
numpy
pandas
scikit-learn
matplotlib
Note: The
_v5suffix in filenames refers to the internal training iteration used during development, not to the version of the published index. The published index is RDIv1.
python normalize_redox.pypython learn_weights_ai_v5.pypython compute_rdi_v5.py --input-csv redox_data_normalized.csv --weights-csv ai_learned_weights_v5.csvpython rdi_visual_v5.py --csv redox_data_with_RDI_v5.csvPlease cite this software package as:
Zivanovic M. RedoxAI-RDI v1.0.1: Python toolkit implementing the Redox Disturbance Index, first iteration (RDIv1). Zenodo. https://doi.org/10.5281/zenodo.17710418
MIT License
Dr. Marko Živanović
Redefining Biology for the Next Generation