Skip to content

SLCPython/healthcareai-py

 
 

Repository files navigation

healthcareai

Appveyor build status

The aim of healthcareai is to streamline machine learning in healthcare. The package has two main goals:

  • Allow one to easily create models based on tabular data, and deploy a best model that pushes predictions to SQL Server.
  • Provide tools related to data cleaning, manipulation, and imputation.

Installation

  • Using Windows
    • Open Spyder (which installed with Anaconda)
    • run conda install pyodbc
    • run pip install https://github.com/HealthCatalystSLC/healthcareai-py/zipball/master
  • Using Linux / OSX (via docker)
    • Clone this repo (look for the green button on the repo main page)
    • cd into the cloned directory
    • run docker build -t healthcareai .
    • run the docker instance with docker run -p 8888:8888 healthcareai
    • You should then have a jupyter notebook available on http://localhost:8888.

Getting started

  • Modify the queries and parameters to match your data
  • If you plan on deploying a model (ie, pushing predictions to SQL Server), run this in SSMS beforehand:
CREATE TABLE [SAM].[dbo].[HCPyDeployClassificationBASE] (
    [BindingID] [int] ,
    [BindingNM] [varchar] (255),
    [LastLoadDTS] [datetime2] (7),
    [PatientEncounterID] [decimal] (38, 0), --< change to your grain col
    [PredictedProbNBR] [decimal] (38, 2),
    [Factor1TXT] [varchar] (255),
    [Factor2TXT] [varchar] (255),
    [Factor3TXT] [varchar] (255))

CREATE TABLE [SAM].[dbo].[HCPyDeployRegressionBASE] (
    [BindingID] [int],
    [BindingNM] [varchar] (255),
    [LastLoadDTS] [datetime2] (7),
    [PatientEncounterID] [decimal] (38, 0), --< change to your grain col
    [PredictedValueNBR] [decimal] (38, 2),
    [Factor1TXT] [varchar] (255),
    [Factor2TXT] [varchar] (255),
    [Factor3TXT] [varchar] (255))

Note that we're currently working on easy connections to other types of databases.

Contributing

We welcome community contributions. See here to get started!

Documentation

To render docs, create a virtualenvironment for hcpytools
  • cd to directory where folder was downloaded
  • Type python -m virtualenv healthcare
Install required python modules
  • Type pip install -r dev-requirements.txt.
For Windows
  • Run sphinx-autobuild docs docs/_build/html in the root of the repo
  • Open a browser to http://127.0.0.1:8000
For non-Windows:

About

Python tools for healthcare machine learning

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 74.0%
  • Jupyter Notebook 10.6%
  • PowerShell 10.5%
  • Batchfile 4.8%
  • Shell 0.1%