Questions tagged [scikit-survival]

scikit-survival is a Python module for survival analysis built on top of scikit-learn. It allows doing survival analysis while utilizing the power of scikit-learn, e.g., for pre-processing or doing cross-validation. Use for questions related to the scikit-survival module

The objective in survival analysis (also referred to as reliability analysis in engineering) is to establish a connection between covariates and the time of an event. Scikit-survival is a Python module for survival analysis built on top of scikit-learn -pypi

27 questions
12
votes
2 answers

How to interpret output of .predict() from fitted scikit-survival model in python?

I'm confused how to interpret the output of .predict from a fitted CoxnetSurvivalAnalysis model in scikit-survival. I've read through the notebook Intro to Survival Analysis in scikit-survival and the API reference, but can't find an explanation.…
Max Power
  • 8,265
  • 13
  • 50
  • 91
3
votes
0 answers

Implausible variable importance for GBM survival: constant difference in importance

I have a question about a GBM survival analysis. I'm trying to quantify variable importances for my variables (n=453), in a data set of 3614 individuals. The resulting graph wi th variable importances looks suspiciously arranged. I have computed…
2
votes
1 answer

How to use decision trees for survival analysis?

I have a problem understanding und applying Decision Trees for Survival Analysis in Python. I have a dataset, with the variables age, weight, size of tumor, volume, ... (all floats) and I want to know if there is a correlation with the overall…
Hashriama
  • 173
  • 11
2
votes
1 answer

Predict survival score and CLTV for contractual discrete policies/terms

I am trying to predict the survival score and LTV for contractual and discrete policies(in insurance) in python. I browsed number of sites but I could find many examples only for non-contractual(in retail). I have used the below code: from…
2
votes
0 answers

Calculating confidence intervals for coefficients in scikit-survival

I'm trying out Cox proportional hazards in python using scikit-survival and I was wondering if it's possible to calculate standard errors or confidence intervals for the log hazard coefficients? Python code (largely lifted from the tutorial on…
1
vote
0 answers

Decision Tree Based Survival Analysis with time-varying covariates in Python

I'd like to predict the remaining survival time with time-varying covariates using Python. I already used lifelines' CoxTimeVaryingFitter and would like to compare it to a decision tree based approach, such as Random Survival Forest. From this paper…
1
vote
1 answer

Passing estimator from Scikit Learn Pipeline to Scikit Survival as_concordance_index_ipcw_scorer

I have a pipeline running preprocessing and then a Random Survival Forest from the SciKit-Survival package. I am trying to use Scikit-Survival's as_concordance_index_ipcw_scorer() class found here. My pipeline looks like the following: …
1
vote
0 answers

kaplan meier estimator not functioning properly

I am trying to run a survivorship curve for field data, and the resulting curve is clearly incorrect. At the last field assessment, the survivorship should be like so: Utah: 0.5505464480874317 Ridgecrest: 0.10817941952506596 Cactus Mine:…
1
vote
0 answers

Why is the truth value of an python array with more than one element is ambiguous?

I have two questions. First, I want to chart the predicted survival function. The code is as follows: from sksurv.preprocessing import OneHotEncoder from sksurv.datasets import load_veterans_lung_cancer from sksurv.linear_model import…
Denmla
  • 135
  • 1
  • 8
1
vote
1 answer

How to plot a survival tree in python

I have developed a survival tree using Survival tree in sksurv. estimator = SurvivalTree().fit(X_train, y_train) I get the following when I do getstate {'max_depth': 21, 'node_count': 135, 'nodes': array([( 1, 134, 59, 2.62050003e+02, inf, 282,…
0
votes
0 answers

Using concordance_index_censored as scorer in GridSearchCV for scikit-survival

In the documentation for scikit-survival it's stated that you can use GridSearchCV for hyperparameter search (hyperparameter optimization). Example code is shown for using as_concordance_index_ipcw_scorer…
0
votes
0 answers

Creating left and interval censored survival data for model comparison

I am currently trying to generate 3 datasets for survival analysis. I would like these datasets to consist have multiple covariates and differ only in the type of censoring, I wish 1 to be right-censored, 1 to be left-censored and 1 be…
0
votes
0 answers

Two subperiods in survival curve using python lifelines

I have a general question on survival curves. I am using the lifelines package, although can also the scikit-survival package as well. I have a population that I track over a 50 year period. I want to break the period into two halves to understand…
akr24
  • 67
  • 3
0
votes
0 answers

Evaluate multiple metrics in a single GridSearchCV with scikit-survival

Currently, I am doing a simulation to compare multiple models, my study doesn't require the best_estimator_ only the results from cv_results_. The problem that I have is that I need the integrated_brier_score and cumulative_dynamic_auc for each…
0
votes
0 answers

Can I use interval censoring data at XGBSE module?

In survival analysis using xgboost/aft, interval censoring data can be applied in input forms like ['lower bound time', 'upper bound time'], where np.inf also can be used as 'upper bound time' values. I am searching how the interval censoring data…
1
2