GithubHelp home page GithubHelp logo

cfmortality's Introduction

R build status

CRAN Status Project Status: Active โ€“ The project has reached a stable, usable state and is being actively developed.

cfmortality

Allows clinicians to predict 1- and 2- year risk of death (with a threshold risk of death of >= 20% for the 1-year model) in cyctic fibrosis patients based on patients' overal health status described in https://erj.ersjournals.com/content/54/3/1900224.

Installation

You can install the latest development version from GitHub:

install.package("remotes")
remotes::install_github("resplab/cfmortality")

Mortality Prediction

To get a prediction for mortality rate for first and second year , you will need to pass in patient's risk factors. For example:

predictcfmortality (age = 16, male = 0, fvc = 66.7, fev1 = 47.4, fev1LastYear = 80.5, bcepacia = 0, underweight = 0, nHosp = 0, pancreaticInsufficient = 1, CFRelatedDiabetes = 0, ageAtDiagnosis = 0.9)

The predictcfmortality() function returns 1- year and 2-year mortality rate of patients with cystic fibrosis with 20% cut-off for risk of death of the 1-year model.

Cloud-based API Access

The Peer Models Network allows users to access cfmortality through the cloud. Fore more info please refer to the PRISM model repository.

R

In R, you can use package peermodels to access the API.

remotes::install_github (resplab/peermodels)
library(peermodels)
connect_to_model("cfmortality", api_key = YOUR_API_KEY)
input <- get_default_input()
results <- model_run(input)

Linux

In Ubuntu, you can call the API with curl:

curl \
-X POST \
-H "x-prism-auth-user: REPLACE_WITH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"func":["prism_model_run"],"model_input":[{"male": 0,"age": 57,"fvc": 66.7,"fev1": 47.4,"fev1LastYear": 80.5,"bcepacia": 0,"underweight": 0,"nHosp": 0,"pancreaticInsufficient": 1,"CFRelatedDiabetes": 0,"ageAtDiagnosis": 0.9}]}' \
https://prism.peermodelsnetwork.com/route/cfmortality/run

Citation

Please cite:

Stanojevic, Sanja, et al. "Development and external validation of 1-and 2-year mortality prediction models in cystic fibrosis." European Respiratory Journal 54.3 (2019): 1900224.

cfmortality's People

Contributors

aminadibi avatar aidakazemi avatar

Watchers

James Cloos avatar Hamid Tavakoli avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.