zahra 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
..
independent_test_outputs 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
notebook_outputs 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
outputs 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
outputs_full_run 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
outputs_high_noise 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
outputs_high_noise_v2 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
README.md 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
run_synthetic_logistic.py 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
synthetic_data.csv 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
synthetic_logistic_01.py 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
synthetic_logistic_02.py 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
synthetic_logistic_03.py 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
synthetic_logistic_04.py 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад
synthetic_logistic_notebook.ipynb 983a2aeba5 Add logistic and Bayesian uncertainty analysis 8 часов назад

README.md

Synthetic logistic reproducibility example

This example runs the existing logistic analysis functions on reproducible, generic synthetic x and y data. The predictor is not on the SUV scale and does not represent a clinical biomarker. It is a software and reproducibility test, not a statistical or clinical validation of the models.

Run from any directory with:

python examples/logistic_synthetic/run_synthetic_logistic.py

The same workflow is also available as four independent stages:

synthetic_logistic_01.py  data, fitting, and goodness of fit
synthetic_logistic_02.py  uncertainty intervals and confidence bands
synthetic_logistic_03.py  elasticity of x50 and s50
synthetic_logistic_04.py  additive and multiplicative measurement noise

synthetic_logistic_notebook.ipynb presents these stages in one clean notebook that can be restarted and run from top to bottom without hidden state.

The script uses fixed random seeds and writes the generated data, tables, and figures to examples/logistic_synthetic/outputs/.

Set SYNTHETIC_OUTPUT_DIR to write a run to a different folder, for example when an existing PDF is open and locked by a viewer on Windows.

The measurement-noise magnitudes can be changed with SYNTHETIC_NOISE_MULT and SYNTHETIC_NOISE_ADD_SD_FRACTION. The latter sets additive noise as a fraction of the sample standard deviation of x.

For a faster smoke test, reduce the replication counts with environment variables:

SYNTHETIC_BOOTSTRAPS=100 SYNTHETIC_MC_DRAWS=5000 SYNTHETIC_NOISE_REFITS=50 SYNTHETIC_NOISE_DRAWS=500 python examples/logistic_synthetic/run_synthetic_logistic.py

The example tests:

  • RAW and LOG logistic fitting and goodness-of-fit;
  • Wald, MCA, NPBS, and PBS intervals and pointwise confidence bands;
  • intervals for x50 and s50;
  • local elasticity of x50 and s50; and
  • additive and multiplicative measurement-noise propagation under fixed-model and refitting analyses.

The synthetic TRIM input is created deterministically by removing one high-valued NC observation. This is included only to exercise the same two-data set code paths as the clinical workflow. It does not imply that trimming improves a model or validates the FULL--TRIM analysis.