survivalgpu.WCECovariate
- class survivalgpu.WCECovariate(name, values, scenario_name, HR_target)
Bases:
CovariateThis class is used to define a WCE covariate, it’s a covariate that impact the log likelihood following a time-dependent pattern of cumulative exposure. The WCE covariate is defined by a scenario that is used to generate the weight of the covariate at each time point
Attributes : - name : the name of the covariate - values : the possible values of the covariate - scenario_name : the name of the scenario used to generate the weight of the covariate - HR_target : the target hazard ratio of the covariate given a value of 1 for a time equal to the cutoff compared to a value of 0 for the time of the cutoff
- __init__(name, values, scenario_name, HR_target)
Methods
__init__(name, values, scenario_name, HR_target)This function generates the WCE matrix that keeps the WCE weight of all patients at all times until the cutoff.
generate_Xvector(rng)Generate the Xmat of TDHist for each individual patient
initialize_experiment(n_patients, max_time, rng)- generate_WCEvector()
This function generates the WCE matrix that keeps the WCE weight of all patients at all times until the cutoff.
- generate_Xvector(rng)
Generate the Xmat of TDHist for each individual patient
- initialize_experiment(n_patients, max_time, rng)