The aim of healthcareai
is to make it easy to do machine learning with healthcare
data. The package has two main goals:
-
Allow one to easily develop and compare models based on tabular data, and deploy a best model that pushes predictions to either databases or flat files.
-
Provide tools related to data cleaning, manipulation, and imputation.
Open RStudio and work in the console
install.packages('healthcareai')
install.packages('assertthat')
Note: If using macOS with healthcare.ai, you'll have to use csv files. We're working on adding MySQL connections. We'd love to hear which other databases your connecting to, so we can provide native support!
- Open the Mac Terminal
- Install Xcode compilers via
xcode-select –install
- Accept the Xcode license via
sudo xcodebuild -license
- Install Homebrew (the macOS package manager) with
- Install ODBC driver via
brew update && brew install unixODBC
- Open R Studio
- In the console, install RODBC from source with
install.packages('RODBC',type = "source")
- In the console, install other R healthcare.ai prerequisites via
install.packages(c('caret','data.table','doParallel','e1071','grpreg','lme4','lubridate','pROC','R6','ranger','ROCR'),repos = "https://cran.cnr.berkeley.edu/")
- Install healthcare.ai
install.packages('healthcareai')
install.packages('assertthat')
- Follow steps 1 and 2 here to install R
- Run
sudo apt-get install libiodbc2-dev
- Run
sudo apt-get install r-cran-rodbc
- After typing
R
runinstall.packages('healthcareai')
andinstall.packages('assertthat')
- Grab prerequisites via the console of RGui or (preferably) RStudio
install.packages(c('caret','data.table','devtools','doParallel','e1071','grpreg','lme4','lubridate','pROC','R6','ranger','ROCR','RODBC'),repos = "https://cran.cnr.berkeley.edu/")
library(devtools)
devtools::install_github(repo='HealthCatalystSLC/healthcareai-r')
Load the package you just installed and read the built-in docs
library(healthcareai)
?healthcareai
See our docs website
If you like Jupyter notebooks, check out step 1 and step 2 in model building with healthcareai.
Read the blog and join the slack channel at healthcare.ai
Since the CRAN 0.1.11 release, the following has been added to the bleeding edge version
- Output nightly predictions to a dataframe for use with MySQL, Oracle, etc. See the csv example at ?RandomForestDeployment
- Evaluate in-the-wild performance via AU_ROC and AU_PR scores and plots. See more at ?generateAUC
- Double check that the code follows the examples in the built-in docs
library(healthcareai)
?healthcareai
-
Make sure you've thoroughly read the descriptions found here
-
If you're still seeing an error, file an issue on Stack Overflow using the healthcare-ai tag. Please provide
- Details on your environment (OS, database type, R vs Py)
- Goals (ie, what are you trying to accomplish)
- Crystal clear steps for reproducing the error
You want to help? Woohoo! We welcome that and are willing to help newbies get started.
First, see here for instructions on setting up your development environment
After that's done, here's the contribution workflow:
-
Identify an issue that suits your skill level here
- Only look for issues in the Backlog category
- If you're new to open source, please look for issues with the
bug low
,help wanted
, ordocs
tags - Please reach out with questions on details and where to start
-
Create a topic branch to work in, as described here
-
Create a throwaway file on the Desktop (or somewhere outside the repo), based on an example
-
As you make changes
-
Early on, create a pull request such that Levi and team can discuss the changes that you're making. Conversation is good.
-
When you're done with the issue you chose, do the following
- Merge the master branch into your topic branch (so that you have the latest changes from master)
git checkout LeviBugFix git fetch git merge --no-ff origin/master
-
Build and fix any errors
-
Run tests via
devtools::tests()
or CTRL+SHIFT+D and fix any errors -
Run the roxygen2 examples via
devtools::run_examples()
and fix any errors -
Under the build tab, run 'Check' and verify that only one roxygen warning arises
- This warning is due to the limitations of roxygen and R6 method documentation
- This is the only warning/error/note that's allowed when merging to master
-
Now that your changes are working, communicate that to Levi in the pull request, such that he knows to do the code review associated with the PR. Please don't do tons of work and then start a PR. Early is good.