External
- class survivors.external.leaf_model.LeafModel(features=[], categ=[], weights_name=None, **kwargs)
Unified wrapper for external models. Can be used as leaf model in tree-based methods. Supported in Experiments module.
Attributes
- featureslist
Covariates for fitting
- features_predictdict
Description values of features (mean by default)
- lists: dict
Source values of target variables
- weights_namestr
Name of the weighting column
- kwargsdict
Internal parameters for the leaf model
Methods
fit : build ensemble on source X_node data predict_list_feature : return full data of variables predict_feature : return aggregated data of variables predict_survival_at_times : return survival function by bins predict_hazard_at_times : return hazard function by bins
- class survivors.external.leaf_model.MeaningLeafModel(*args, **kwargs)
Nonparametric model with virtual events generated by bootstrap meaning
- class survivors.external.leaf_model.MixLeafModel(*args, **kwargs)
Nonparametric model with virtual events (normal distributions + bootstrap meaning)
- class survivors.external.leaf_model.NonparamLeafModel(*args, **kwargs)
- class survivors.external.leaf_model.NormalizedLeafModel(*args, **kwargs)
Nonparametric model with virtual events (normal distribution) and non-informative censuring
- class survivors.external.leaf_model.StableLeafModel(*args, **kwargs)
Nonparametric model with stable virtual events (with median mu and adaptive size) and non-informative censuring
- class survivors.external.nonparametric.BaseLeafModeLL(*args, **kwargs)
- hazard_class
alias of
NelsonAalenFitter
- survival_class
alias of
KaplanMeierFitter
- class survivors.external.nonparametric.BaseLeafModel(*args, **kwargs)
- hazard_class
alias of
NelsonAalen
- survival_class
alias of
KaplanMeier
- class survivors.external.nonparametric.BaseLeafModelOnlyHazard(*args, **kwargs)
- hazard_class
alias of
NelsonAalen
- class survivors.external.nonparametric.BaseLeafModelOnlySurv(*args, **kwargs)
- survival_class
alias of
KaplanMeier
- class survivors.external.nonparametric.BaseMeaningLeafModel(*args, **kwargs)
- hazard_class
alias of
NelsonAalen
- survival_class
alias of
KaplanMeierZeroAfter
- class survivors.external.nonparametric.BaseMixLeafModel(*args, **kwargs)
- hazard_class
alias of
NelsonAalen
- survival_class
alias of
KaplanMeierZeroAfter
- class survivors.external.nonparametric.BaseNormalizedLeafModel(*args, **kwargs)
- hazard_class
alias of
NelsonAalen
- survival_class
alias of
KaplanMeierZeroAfter
- class survivors.external.nonparametric.FullProbKM(**kwargs)
A KM model predicting the survival function using the full probability formula
- class survivors.external.nonparametric.KaplanMeier(**kwargs)
Modification of classic Kaplan-Meier model
Attributes
- timelinenumpy ndarray
Bins of event time
- survival_functionnumpy ndarray
Survival probability for all points of timeline
- cumul_hist_durnumpy ndarray
Cumulative hazard probability for all points of timeline
Methods
fit : Build nonparametric model get_confidence_interval_ : predict confidence interval by times survival_function_at_times : predict survival probability by times
- count_confidence_interval()
Calculated by exponential Greenwood: https://www.math.wustl.edu/~sawyer/handouts/greenwood.pdf
- class survivors.external.nonparametric.KaplanMeierZeroAfter(**kwargs)
External pre-definition of the left and right KM estimation bounds with one and zero.
- class survivors.external.nonparametric.NelsonAalen(smoothing=True, **kwargs)
Modification of classic Nelson-Aalen model
Attributes
- timelinenumpy ndarray
Bins of event time
- survival_functionnumpy ndarray
Survival probability for all points of timeline
- smoothingbool
Flag the need for density smoothing
Methods
fit : Build nonparametric model cumulative_hazard_at_times : predict hazard probability by times get_smoothed_hazard_at_times : predict smoothed hazard probability by times
- class survivors.external.nonparametric.StableLeafModel(*args, **kwargs)
- hazard_class
alias of
NelsonAalen
- survival_class
alias of
KaplanMeierZeroAfter
- class survivors.external.parametric.CoxPH(except_stop=False, **kwargs)
- base_model
alias of
CoxPHFitter
- class survivors.external.parametric.LogLogisticAFT(except_stop=False, **kwargs)
- base_model
alias of
LogLogisticAFTFitter
- class survivors.external.parametric.LogNormalAFT(except_stop=False, **kwargs)
- base_model
alias of
LogNormalAFTFitter
- class survivors.external.parametric.ParametricLifelinesBase(except_stop=False, **kwargs)