pysurvival | Open source package for Survival Analysis modeling | Machine Learning library
kandi X-RAY | pysurvival Summary
kandi X-RAY | pysurvival Summary
PySurvival is an open source python package for Survival Analysis modeling - the modeling concept used to analyze or predict when an event is likely to happen. It is built upon the most commonly used machine learning packages such NumPy, SciPy and PyTorch. PySurvival is compatible with Python 2.7-3.7.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pysurvival
pysurvival Key Features
pysurvival Examples and Code Snippets
Community Discussions
Trending Discussions on pysurvival
QUESTION
I am using the pysurvival
library to model with the Cox proportional hazard model (CPH). Instead of getting the survival curves, I am interested in getting point predictions. In the library, the function predict_survival
returns an array-like representing the prediction of the survival function which I assume that I can use to get the expected values - but I just cant find the right way.
Below I've attached a dummy example.
...ANSWER
Answered 2021-Apr-19 at 10:20As mentioned we can use the function predict_survival
to get the estimated survival probability. Furthermore, by calling coxPH.times
we obtain the time of every estimated survival probability, and thereby for example can plot the individual survival curve for every observation and calculate the area under the curve. By using the auc
function from the sklearn.metrics
library the following definition gives point predictions for the training and test set given a CPH model, the X_test
data and X_train
data:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pysurvival
Because of its simple API, Pysurvival has been built to provide to best user experience when it comes to modeling. Here's a quick modeling example to get you started:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page