survivalgpu.ConstantCovariate

class survivalgpu.ConstantCovariate(name, values, weights, coef)

Bases: Covariate

This class is used to define a constant cox covariate, it’s a covariate that impacts the values taken by the patients at each time point are constant It impact the log-likelihood like in the cox model

Attributes : - name : the name of the covariate - values : the possible values of the covariate - weights : the weights of each value, for each patient, the value is chosen with a probability proportional to the weights - 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)

__init__(name, values, weights, coef)

Methods

__init__(name, values, weights, coef)

generate_Xvector(rng)

initialize_experiment(n_patients, max_time, rng)

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