├── docs ├── _data │ ├── terms.yml │ ├── glossary.yml │ ├── definitions.yml │ ├── tags.yml │ ├── topnav.yml │ ├── alerts.yml │ └── sidebars │ │ └── home_sidebar.yml ├── .gitignore ├── _layouts │ ├── none.html │ ├── page_print.html │ ├── default_print.html │ ├── page.html │ └── default.html ├── images │ ├── favicon.ico │ ├── output_8_0.png │ ├── doc_example.png │ ├── workflowarrow.png │ ├── export_example.png │ └── company_logo_big.png ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── _includes │ ├── inline_image.html │ ├── callout.html │ ├── note.html │ ├── tip.html │ ├── important.html │ ├── warning.html │ ├── archive.html │ ├── image.html │ ├── search_google_custom.html │ ├── footer.html │ ├── google_analytics.html │ ├── toc.html │ ├── search_simple_jekyll.html │ ├── links.html │ ├── head_print.html │ ├── sidebar.html │ ├── topnav.html │ ├── initialize_shuffle.html │ └── head.html ├── css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── boxshadowproperties.css │ ├── modern-business.css │ ├── theme-green.css │ ├── theme-blue.css │ ├── printstyles.css │ └── syntax.css ├── Gemfile ├── tooltips.json ├── sitemap.xml ├── core.html ├── sidebar.json ├── js │ ├── jquery.ba-throttle-debounce.min.js │ ├── customscripts.js │ ├── jquery.navgoco.min.js │ ├── toc.js │ └── jekyll-search.js ├── hazard.html ├── licenses │ ├── LICENSE │ └── LICENSE-BSD-NAVGOCO.txt ├── _config.yml ├── feed.xml ├── utils.html ├── SAT.html ├── AFT_models.html ├── Gemfile.lock ├── Losses.html └── data.html ├── torchlife ├── models │ ├── __init__.py │ ├── error_dist.py │ ├── km.py │ ├── aft.py │ ├── cox.py │ └── ph.py ├── __init__.py ├── core.py ├── _nbdev.py ├── losses.py ├── data.py └── model.py ├── Makefile ├── settings.ini ├── 50_hazard.ipynb ├── .github └── workflows │ └── main.yml ├── setup.py ├── .gitignore ├── CONTRIBUTING.md ├── 10_SAT.ipynb ├── 95_Losses.ipynb ├── README.md ├── 60_AFT_models.ipynb ├── LICENSE └── 80_data.ipynb /docs/_data/terms.yml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | -------------------------------------------------------------------------------- /docs/_data/glossary.yml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /torchlife/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_data/definitions.yml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /torchlife/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.0.4" 2 | -------------------------------------------------------------------------------- /docs/_layouts/none.html: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | {{content}} -------------------------------------------------------------------------------- /docs/_data/tags.yml: -------------------------------------------------------------------------------- 1 | allowed-tags: 2 | - getting_started 3 | - navigation 4 | -------------------------------------------------------------------------------- /docs/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/images/favicon.ico -------------------------------------------------------------------------------- /docs/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/images/output_8_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/images/output_8_0.png -------------------------------------------------------------------------------- /docs/_includes/inline_image.html: -------------------------------------------------------------------------------- 1 | {{include.alt}} 2 | -------------------------------------------------------------------------------- /docs/images/doc_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/images/doc_example.png -------------------------------------------------------------------------------- /docs/images/workflowarrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/images/workflowarrow.png -------------------------------------------------------------------------------- /docs/css/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/css/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /docs/images/export_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/images/export_example.png -------------------------------------------------------------------------------- /docs/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/images/company_logo_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/images/company_logo_big.png -------------------------------------------------------------------------------- /docs/_includes/callout.html: -------------------------------------------------------------------------------- 1 |
{{include.content}}
2 | -------------------------------------------------------------------------------- /docs/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /torchlife/core.py: -------------------------------------------------------------------------------- 1 | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified). 2 | 3 | __all__ = [] -------------------------------------------------------------------------------- /docs/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sachinruk/torchlife/HEAD/docs/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /docs/_includes/note.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/_includes/tip.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_includes/important.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_includes/warning.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'github-pages', group: :jekyll_plugins 4 | 5 | 6 | # Added at 2019-11-25 10:11:40 -0800 by jhoward: 7 | gem "jekyll", "~> 3.7" 8 | -------------------------------------------------------------------------------- /docs/_data/topnav.yml: -------------------------------------------------------------------------------- 1 | topnav: 2 | - title: Topnav 3 | items: 4 | - title: GitHub 5 | external_url: https://github.com/sachinruk/torchlife 6 | 7 | #Topnav dropdowns 8 | topnav_dropdowns: 9 | - title: Topnav dropdowns 10 | folders: -------------------------------------------------------------------------------- /docs/_includes/archive.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | type: archive 4 | --- 5 | 6 |
7 |

{{ page.title }}

8 |
9 |
10 | 11 | {{ content }} 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/tooltips.json: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | search: exclude 4 | --- 5 | 6 | { 7 | "entries": 8 | [ 9 | {% for page in site.tooltips %} 10 | { 11 | "doc_id": "{{ page.doc_id }}", 12 | "body": "{{ page.content | strip_newlines | replace: '\', '\\\\' | replace: '"', '\\"' }}" 13 | } {% unless forloop.last %},{% endunless %} 14 | {% endfor %} 15 | ] 16 | } 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/_includes/image.html: -------------------------------------------------------------------------------- 1 |
{% if {{include.url}} %}{% endif %}{{include.alt}}{% if {{include.url}} %}{% endif %}{% if {{include.caption}} %}
{{include.caption}}
{% endif %}
2 | -------------------------------------------------------------------------------- /docs/_layouts/page_print.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default_print 3 | comments: true 4 | --- 5 |
6 |

{{ page.title }}

7 |
8 | 9 |
10 | 11 | {% if page.summary %} 12 |
{{page.summary}}
13 | {% endif %} 14 | {{ content }} 15 |
16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SRC = $(wildcard ./*.ipynb) 2 | 3 | all: torchlife docs 4 | 5 | torchlife: $(SRC) 6 | nbdev_build_lib 7 | touch torchlife 8 | 9 | docs_serve: docs 10 | cd docs && bundle exec jekyll serve 11 | 12 | docs: $(SRC) 13 | nbdev_build_docs 14 | touch docs 15 | 16 | test: 17 | nbdev_test_nbs 18 | 19 | release: pypi 20 | nbdev_bump_version 21 | 22 | pypi: dist 23 | twine upload --repository pypi dist/* 24 | 25 | dist: clean 26 | python setup.py sdist bdist_wheel 27 | 28 | clean: 29 | rm -rf dist -------------------------------------------------------------------------------- /docs/_includes/search_google_custom.html: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | 15 |
16 | 17 | -------------------------------------------------------------------------------- /docs/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /docs/_layouts/default_print.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% include head_print.html %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | {{content}} 18 |
19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/_includes/google_analytics.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% if site.google_analytics %} 4 | 5 | 6 | {% endif %} -------------------------------------------------------------------------------- /docs/sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: none 3 | search: exclude 4 | --- 5 | 6 | 7 | 8 | {% for post in site.posts %} 9 | {% unless post.search == "exclude" %} 10 | 11 | {{site.url}}{{post.url}} 12 | 13 | {% endunless %} 14 | {% endfor %} 15 | 16 | 17 | {% for page in site.pages %} 18 | {% unless page.search == "exclude" %} 19 | 20 | {{site.url}}{{ page.url}} 21 | 22 | {% endunless %} 23 | {% endfor %} 24 | -------------------------------------------------------------------------------- /docs/core.html: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | title: module name here 4 | 5 | keywords: fastai 6 | sidebar: home_sidebar 7 | 8 | summary: "API details." 9 | --- 10 | 19 | 20 |
21 | 22 |
23 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/css/boxshadowproperties.css: -------------------------------------------------------------------------------- 1 | /* box-shadow fonts return errors with prince, so extracting here to put in web output only */ 2 | 3 | #search-demo-container ul#results-container { 4 | box-shadow: 2px 3px 2px #dedede; 5 | } 6 | 7 | 8 | hr.shaded { 9 | box-shadow: inset 0 6px 6px -6px rgba(0,0,0,0.5); 10 | } 11 | 12 | .videoThumbs img { 13 | box-shadow: 2px 2px 1px #f0f0f0; 14 | } 15 | 16 | .box { 17 | box-shadow: 2px 2px 4px #dedede; 18 | } 19 | 20 | @media (max-width: 1200px) { 21 | .navbar-collapse { 22 | box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /docs/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "torchlife": { 3 | "Overview": "/", 4 | "Survival Analysis Theory": "/SAT", 5 | "Kaplan Meier Model": "/KaplanMeier", 6 | "": { 7 | "Hazard Models": { 8 | "Overview": "/hazard", 9 | "Piecewise Hazard": "/hazard.PiecewiseHazard", 10 | "Cox Proportional Hazard": "/hazard.Cox" 11 | } 12 | }, 13 | "empty1": { 14 | "AFT": { 15 | "Error Distributions": "/AFT_error_distributions", 16 | "Accelerated Failure Time Models": "/AFT_models" 17 | } 18 | }, 19 | "empty2": { 20 | "Model": { 21 | "Data": "/data", 22 | "Base Model": "/model", 23 | "Losses": "/Losses" 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /docs/js/jquery.ba-throttle-debounce.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery throttle / debounce - v1.1 - 3/7/2010 3 | * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 4 | * 5 | * Copyright (c) 2010 "Cowboy" Ben Alman 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://benalman.com/about/license/ 8 | */ 9 | (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); -------------------------------------------------------------------------------- /docs/_includes/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 |
22 | -------------------------------------------------------------------------------- /docs/_includes/search_simple_jekyll.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | 6 | 17 | -------------------------------------------------------------------------------- /settings.ini: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | lib_name = torchlife 3 | user = sachinruk 4 | description = Deep Learning for Survival Analysis 5 | keywords = Survival Analysis, Deep Learning, PyTorch, Fastai 6 | author = Sachinthaka Abeywardana 7 | author_email = sachinra@it.usyd.edu.au 8 | copyright = Sachinthaka Abeywardana 9 | branch = master 10 | version = 0.0.4 11 | min_python = 3.6 12 | audience = Developers 13 | language = English 14 | custom_sidebar = True 15 | license = apache2 16 | status = 2 17 | nbs_path = . 18 | doc_path = docs 19 | requirements = fastai==1.0.61 scikit-learn==0.22.1 torch>=1.2.0 matplotlib pandas scipy 20 | doc_host = https://sachinruk.github.io 21 | doc_baseurl = /torchlife/ 22 | git_url = https://github.com/sachinruk/torchlife/tree/master/ 23 | lib_path = torchlife 24 | title = torchlife 25 | host = github 26 | 27 | -------------------------------------------------------------------------------- /50_hazard.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Hazard Models\n", 8 | "> Hazard based models." 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "We can choose to model the [instantaneous hazard](./SAT#The-Survival-Function) directly. There are two methods:\n", 16 | "\n", 17 | "- [Piecewise Hazard](./hazard.PiecewiseHazard)\n", 18 | "- [Cox Model](./hazard.Cox) which is an extension of the" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": null, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [] 27 | } 28 | ], 29 | "metadata": { 30 | "kernelspec": { 31 | "display_name": "Python 3", 32 | "language": "python", 33 | "name": "python3" 34 | } 35 | }, 36 | "nbformat": 4, 37 | "nbformat_minor": 4 38 | } 39 | -------------------------------------------------------------------------------- /docs/_data/alerts.yml: -------------------------------------------------------------------------------- 1 | tip: '