survivalgpu.TimeDependentCovariate

class survivalgpu.TimeDependentCovariate(name, values, coef, cumulative=False, cutoff=None)

Bases: Covariate

This class is used to define a time-dependent cox covariate, it’s a covariate that impact The values are time-dependant and can be cumulative or not. If they are cumulative the values are summed over a period determined by the cutoff It impact the log-likelihood like in the cox model

Attributes : - name : the name of the covariate - values : the possible values of the covariate - coef : the coefficient of the covariate in the cox model (the coefficient is equal to the log of the hazard ratio of the covariate for a value of 1 compared to a value of 0) - cumulative : a boolean that indicates if the values are cumulative or not - cutoff : the cutoff period for the cumulative values, if a cumulative covariate is not given a cutoff, the cutoff is set to the max_time

__init__(name, values, coef, cumulative=False, cutoff=None)

Methods

__init__(name, values, coef[, cumulative, ...])

cumulate_exposure(cutoff)

generate_Xvector(rng)

initialize_experiment(n_patients, max_time, rng)

cumulate_exposure(cutoff)
generate_Xvector(rng)
initialize_experiment(n_patients, max_time, rng)