API reference

Models

CoxPHSurvivalAnalysis

Cox Proportional Hazards model.

WCESurvivalAnalysis

Simulation

simulate_dataset

Simulates a long-format survival dataset with covariates matched to target hazard ratios.

simulate_dataset_batch

Simulates a dataset of n_patients patients by concatenating smaller chunks.

simulate_for_experiment

Simulates a dataset with a single WCE "dose" covariate, for benchmarking/validation experiments.

ConstantCovariate

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

TimeDependentCovariate

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.

WCECovariate

This 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.

Utilities

use_cuda

bool(x) -> bool