All Projects → square → Pysurvival

square / Pysurvival

Licence: apache-2.0
Open source package for Survival Analysis modeling

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pysurvival

Color recognition
🎨 Color recognition & classification & detection on webcam stream / on video / on single image using K-Nearest Neighbors (KNN) is trained with color histogram features by OpenCV.
Stars: ✭ 154 (-8.88%)
Mutual labels:  numpy
Mobulaop
A Simple & Flexible Cross Framework Operators Toolkit
Stars: ✭ 161 (-4.73%)
Mutual labels:  numpy
Funsor
Functional tensors for probabilistic programming
Stars: ✭ 164 (-2.96%)
Mutual labels:  numpy
Orjson
Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
Stars: ✭ 2,595 (+1435.5%)
Mutual labels:  numpy
Cheatsheets.pdf
📚 Various cheatsheets in PDF
Stars: ✭ 159 (-5.92%)
Mutual labels:  numpy
Pywt
We're moving. Please visit https://github.com/PyWavelets
Stars: ✭ 161 (-4.73%)
Mutual labels:  numpy
Lits Liver Tumor Segmentation Challenge
LiTS - Liver Tumor Segmentation Challenge
Stars: ✭ 153 (-9.47%)
Mutual labels:  numpy
Scientific Visualization Book
An open access book on scientific visualization using python and matplotlib
Stars: ✭ 6,336 (+3649.11%)
Mutual labels:  numpy
Kalman Filter
Kalman Filter implementation in Python using Numpy only in 30 lines.
Stars: ✭ 161 (-4.73%)
Mutual labels:  numpy
Cython Blis
💥 Fast matrix-multiplication as a self-contained Python library – no system dependencies!
Stars: ✭ 165 (-2.37%)
Mutual labels:  numpy
Cam board
Turn web cam into a black / white board
Stars: ✭ 157 (-7.1%)
Mutual labels:  numpy
Numsca
numsca is numpy for scala
Stars: ✭ 160 (-5.33%)
Mutual labels:  numpy
Ta
Technical Analysis Library using Pandas and Numpy
Stars: ✭ 2,649 (+1467.46%)
Mutual labels:  numpy
Rnn lstm from scratch
How to build RNNs and LSTMs from scratch with NumPy.
Stars: ✭ 156 (-7.69%)
Mutual labels:  numpy
Micropython Ulab
a numpy-like fast vector module for micropython, circuitpython, and their derivatives
Stars: ✭ 166 (-1.78%)
Mutual labels:  numpy
Pyaudiodsptools
Numpy Audio DSP Tools
Stars: ✭ 154 (-8.88%)
Mutual labels:  numpy
Py
Repository to store sample python programs for python learning
Stars: ✭ 4,154 (+2357.99%)
Mutual labels:  numpy
Panthera
Data-frames & arrays on Clojure
Stars: ✭ 168 (-0.59%)
Mutual labels:  numpy
Xarray
N-D labeled arrays and datasets in Python
Stars: ✭ 2,353 (+1292.31%)
Mutual labels:  numpy
Pytubes
A module for getting data into python from large data sources
Stars: ✭ 164 (-2.96%)
Mutual labels:  numpy

PySurvival

pysurvival_logo

What is Pysurvival ?

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.

Check out the documentation here


Content

PySurvival provides a very easy way to navigate between theoretical knowledge on Survival Analysis and detailed tutorials on how to conduct a full analysis, build and use a model. Indeed, the package contains:


Installation

If you have already installed a working version of gcc, the easiest way to install Pysurvival is using pip

pip install pysurvival

The full description of the installation steps can be found here.


Get Started

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:

# Loading the modules
from pysurvival.models.semi_parametric import CoxPHModel
from pysurvival.models.multi_task import LinearMultiTaskModel
from pysurvival.datasets import Dataset
from pysurvival.utils.metrics import concordance_index

# Loading and splitting a simple example into train/test sets
X_train, T_train, E_train, X_test, T_test, E_test = \
	Dataset('simple_example').load_train_test()

# Building a CoxPH model
coxph_model = CoxPHModel()
coxph_model.fit(X=X_train, T=T_train, E=E_train, init_method='he_uniform', 
                l2_reg = 1e-4, lr = .4, tol = 1e-4)

# Building a MTLR model
mtlr = LinearMultiTaskModel()
mtlr.fit(X=X_train, T=T_train, E=E_train, init_method = 'glorot_uniform', 
           optimizer ='adam', lr = 8e-4)

# Checking the model performance
c_index1 = concordance_index(model=coxph_model, X=X_test, T=T_test, E=E_test )
print("CoxPH model c-index = {:.2f}".format(c_index1))

c_index2 = concordance_index(model=mtlr, X=X_test, T=T_test, E=E_test )
print("MTLR model c-index = {:.2f}".format(c_index2))

Citation and License

Citation

If you use Pysurvival in your research and we would greatly appreciate if you could use the following:

@Misc{ pysurvival_cite,
  author =    {Stephane Fotso and others},
  title =     {PySurvival: Open source package for Survival Analysis modeling},
  year =      {2019--},
  url = "https://www.pysurvival.io/"
}

License

Copyright 2019 Square Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].