Train and store a survival model to be loaded at a later point for prediction.
Trains a survival model using the Cox Proportional Hazard model.
The output will always be a new column with the trained model’s predictions on the training data,
as well as a saved and named model file that can be used in other projects for prediction of new data.
The following shows how the step can be used in a recipe.
General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.
General syntax for using the step in a recipe. Shows the inputs and outputs the step is expected to receive and will produce respectively. For futher details see sections below.
The following are the inputs expected by the step and the outputs it produces. These are generally
columns (ds.first_name), datasets (ds or ds[["first_name", "last_name"]]) or models (referenced
by name e.g. "churn-clf").
The following parameters can be used to configure the behaviour of the step by including them in
a json object as the last “input” to the step, i.e. step(..., {"param": "value", ...}) -> (output).
Kind of prediction.
median returns the median survival time. percentile returns the survival time at
the given percentile. expectation returns the expected survival time.
survival_function returns the whole survival function (one series per sample).
Points in time to predict.
Configures at which points to predict when kind is set to survival_function.
Either an explicit array of durations, or an object specifying a duration step size and
maximum duration.
Penalizer strength.
Attach an L2 penalizer to the size of the coefficients during regression.
This improves stability of the estimates and controls for high correlation between covariates.
Kind of prediction.
median returns the median survival time. percentile returns the survival time at
the given percentile. expectation returns the expected survival time.
survival_function returns the whole survival function (one series per sample).
Points in time to predict.
Configures at which points to predict when kind is set to survival_function.
Either an explicit array of durations, or an object specifying a duration step size and
maximum duration.
Penalizer strength.
Attach an L2 penalizer to the size of the coefficients during regression.
This improves stability of the estimates and controls for high correlation between covariates.