Code based on the Three Key Parameters model
|
|
2 周之前 | |
|---|---|---|
| __pycache__ | 6 月之前 | |
| README.md | 2 周之前 | |
| inverse_transform.ipynb | 6 月之前 | |
| three_parameter_screening.py | 6 月之前 |
This is the code by Howard used in his study of the Three Parameter Model to personalize breast cancer screening.
Implemented from
R.Liu, Estimation of the three key parameters and the lead time distribution in lung cancer screening, PhD Thesis, 2017, University of Luisville, Luisville, Kentucky.
import sys
import os
import numpy
mPath=os.path.join('path','to','cloned','code')
import three_parameter_screening
#probabilty of conversion to early cancer stage per screening interval
w=0.1
#sensitivity of the screening exam
beta=0.9
#average of the exponential distribution Q of dwell time in early cancer stage, in units of screening interval
mu=0.3
#exponential distribution
def Q(t):
return numpy.exp(-t/mu)
#screening intervals
t=numpy.linspace(0,9,10)
#generate incidence (interval cancers I_i)
I=three_parameter_screening.probabilty_of_clinical_incidence(beta,w,mu,t,Q)
#generate screen detection (D_i)
D=three_parameter_screening.probabilty_of_preclinical_diagnosis(beta,w,mu,t,Q)
#somehow generate a vector of data
n,s,r=getData()
#calculate likelihood
alpha=[beta]
L=three_parameter_screening.likelihood_function(D,I,n,s,r,alpha,beta)