{ "info": { "author": "Levi Thatcher", "author_email": "levi.thatcher@healthcatalyst.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "Intended Audience :: Healthcare Industry", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# healthcareai\n\n[![Appveyor build status](https://ci.appveyor.com/api/projects/status/github/HealthCatalyst/healthcareai-py?branch=master&svg=true)](https://ci.appveyor.com/project/CatalystAdmin/healthcareai-py/branch/master)\n[![Build Status](https://travis-ci.org/HealthCatalyst/healthcareai-py.svg?branch=master)](https://travis-ci.org/HealthCatalyst/healthcareai-py)\n[![Anaconda-Server Badge](https://anaconda.org/catalyst/healthcareai/badges/version.svg)](https://anaconda.org/catalyst/healthcareai)\n[![Anaconda-Server Badge](https://anaconda.org/catalyst/healthcareai/badges/installer/conda.svg)](https://conda.anaconda.org/catalyst)\n[![PyPI version](https://badge.fury.io/py/healthcareai.svg)](https://badge.fury.io/py/healthcareai)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/HealthCatalyst/healthcareai-py/master/LICENSE)\n\nThe aim of **healthcareai** is to streamline machine learning in healthcare. The package has two main goals:\n\n- Allow one to easily create models based on tabular data, and deploy a best model that pushes predictions to a database such as MSSQL, MySQL, SQLite or csv flat file.\n- Provide tools related to data cleaning, manipulation, and imputation.\n\n## Installation\n\n### Windows\n\n- If you haven't, install 64-bit Python 3.5 via [the Anaconda distribution](https://repo.continuum.io/archive/Anaconda3-4.2.0-Windows-x86_64.exe)\n - **Important** When prompted for the **Installation Type**, select **Just Me (recommended)**. This makes permissions later in the process much simpler.\n- Open the terminal (i.e., CMD or PowerShell, if using Windows)\n- Run `conda install pyodbc`\n- Upgrade to latest scipy (note that upgrade command took forever)\n- Run `conda remove scipy`\n- Run `conda install scipy`\n- Run `conda install scikit-learn`\n- Install healthcareai using **one and only one** of these three methods (ordered from easiest to hardest).\n 1. **Recommended:** Install the latest release with conda by running `conda install -c catalyst healthcareai`\n 2. Install the latest release with pip run `pip install healthcareai`\n 3. If you know what you're doing, and instead want the bleeding-edge version direct from our github repo, run `pip install https://github.com/HealthCatalyst/healthcareai-py/zipball/master`\n\n#### Why Anaconda?\n\nWe recommend using the Anaconda python distribution when working on Windows. There are a number of reasons:\n- When running anaconda and installing packages using the `conda` command, you don't need to worry about [dependency hell](https://en.wikipedia.org/wiki/Dependency_hell), particularly because packages aren't compiled on your machine; `conda` installs pre-compiled binaries.\n- A great example of the pain the using `conda` saves you is with the python package **scipy**, which, by [their own admission](http://www.scipy.org/scipylib/building/windows.html) *\"is difficult\"*.\n\n### Linux\n\nYou may need to install the following dependencies:\n- `sudo apt-get install python-tk`\n- `sudo pip install pyodbc`\n - Note you'll might run into trouble with the `pyodbc` dependency. You may first need to run `sudo apt-get install\n unixodbc-dev` then retry `sudo pip install pyodbc`. Credit [stackoverflow](http://stackoverflow.com/questions/2960339/unable-to-install-pyodbc-on-linux)\n\nOnce you have the dependencies satisfied run `pip install healthcareai` or `sudo pip install healthcareai`\n\n### macOS\n\n- `pip install healthcareai` or `sudo pip install healthcareai`\n\n### Linux and macOS (via docker)\n\n- Install [docker](https://docs.docker.com/engine/installation/)\n- Clone this repo (look for the green button on the repo main page)\n- cd into the cloned directory\n- run `docker build -t healthcareai .`\n- run the docker instance with `docker run -p 8888:8888 healthcareai` \n- You should then have a jupyter notebook available on `http://localhost:8888`.\n\n### Verify Installation\n\nTo verify that *healthcareai* installed correctly, open a terminal and run `python`. This opens an interactive python\nconsole (also known as a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)). Then enter this\ncommand: `from healthcareai import SupervisedModelTrainer` and hit enter. If no error is thrown, you are ready to rock.\n\nIf you did get an error, or run into other installation issues, please [let us know](http://healthcare.ai/contact.html)\nor better yet post on [Stack Overflow](http://stackoverflow.com/questions/tagged/healthcare-ai) (with the healthcare-ai\ntag) so we can help others along this process.\n\n## Getting started\n\n- Visit [healthcare.ai](http://healthcareai-py.readthedocs.io/en/latest/) to read the docs and find examples.\n * Including this [notebook](notebooks/Example1.ipynb)\n- Open Sphinx (which installed with Anaconda) and copy the examples into a new file\n- Modify the queries and parameters to match your data\n- If you plan on deploying a model (ie, pushing predictions to SQL Server), run this in SSMS beforehand:\n ```sql\n CREATE TABLE [SAM].[dbo].[HCAIClassificationBASE] (\n [BindingID] [int] ,\n [BindingNM] [varchar] (255),\n [LastLoadDTS] [datetime2] (7),\n [PatientEncounterID] [decimal] (38, 0), --< change to your grain col\n [PredictedProbNBR] [decimal] (38, 2),\n [Factor1TXT] [varchar] (255),\n [Factor2TXT] [varchar] (255),\n [Factor3TXT] [varchar] (255))\n\n CREATE TABLE [SAM].[dbo].[HCAIPredictionRegressionBASE] (\n [BindingID] [int],\n [BindingNM] [varchar] (255),\n [LastLoadDTS] [datetime2] (7),\n [PatientEncounterID] [decimal] (38, 0), --< change to your grain col\n [PredictedValueNBR] [decimal] (38, 2),\n [Factor1TXT] [varchar] (255),\n [Factor2TXT] [varchar] (255),\n [Factor3TXT] [varchar] (255))\n ```\n\n## For Issues\n\n- Double check that the code follows the examples [here](http://healthcareai-py.readthedocs.io/en/latest/)\n- If you're still seeing an error, create a post in [Stack Overflow](http://stackoverflow.com/questions/tagged/healthcare-ai) (with the healthcare-ai tag) that contains\n * Details on your environment (OS, database type, R vs Py)\n * Goals (ie, what are you trying to accomplish)\n * Crystal clear steps for reproducing the error\n- You can also log a new issue in the GitHub repo by clicking [here](https://github.com/HealthCatalyst/healthcareai-py/issues/new)\n\n## PyPI Package Creation and Updating\n\n**Note these instructions are for maintainers only.**\n\nFirst, read this [Packaging and Distributing Projects](https://packaging.python.org/distributing/) guide.\n\nIt's also worth noting that while this *should* be done on the [pypi test site](https://testpypi.python.org/pypi), I've\nrun into a great deal of trouble with conflicting guides authenticating to the test site. So be smart about this.\n\n1. **Build a source distribution**: from python3 (ran in windows anaconda python 3) run `python setup.py sdist`\n2. **Register the package** by using the[form on pypi](https://pypi.python.org/pypi?%3Aaction=pkg_edit&name=healthcareai).\n Upload your `PKG-INFO` that was generated inside the `.egg` file.\n3. **Upload the package** using [twine](https://pypi.python.org/pypi/twine)\n - `twine upload dist/healthcareai-.tar.gz`\n - **NOTE** You can only ever upload a file name **once**. To get around this I was adding a *rc* number to the\n version in `setup.py`. However, this **will break the appveyor build**, so you'll need to remove the `.rc` before\n you push to github.\n4. Verify install on all three platforms (linux, macOS, windows) by:\n 1. `pip uninstall healthcareai`\n 2. `pip install healthcareai`\n 3. From a python console, type `from healthcareai import SupervisedModelTrainer`\n\n### Release process (Including Read The Docs)\n\n1. update all version numbers\n - `setup.py`\n2. update CHANGELOG\n - Move all items under **unreleased** to a new release number\n - Leave the template under **unreleased**\n3. merge in the PR\n4. create release on github releases (making sure this matches the release number in `setup.py`)\n5. Create and upload the new pypi release (see above)\n6. update readthedocs settings\n - **Admin** > **Versions**\n - Ensure that the new release number is checked for **public**\n7. Manually build new read the docs\n - **Builds** > **Build version **\n8. verify the new version builds and is viewable at the public url\n\n### Conda Packaging and Distribution\n\nCreating a conda package is much easier if you have already built the PyPI package.\n\n1. Install prerequisites (only needed once)\n + Install conda build `conda install conda-build`\n + Install anaconda cli `conda install anaconda-client`\n + Login to anaconda.org with `anaconda login`\n2. Configure conda\n + `conda config --set always_yes true`\n + `conda config --set anaconda_upload no`\n3. Create the skeleton conda recipe from the existing PyPI package\n + `conda skeleton pypi healthcareai`\n4. Build the conda package for the main python versions\n + `conda build --python 2.7 healthcareai`\n + `conda build --python 3.4 healthcareai`\n + `conda build --python 3.5 healthcareai`\n + `conda build --python 3.6 healthcareai`\n5. Convert the existing builds to work on all platforms (win32, win64, osx62, linux32, linux64). Note this can take a while.\n + `conda convert --platform all win-64/healthcareai-*-py*.tar.bz2 -o `\n6. Upload to anaconda using the anaconda cli\n + Note that you'll have to keep track of where the builds are put!\n + `anaconda upload /**/healthcareai*.tar.bz2`\n7. Clean up the mess\n + `conda build purge`\n\n##### Helpful Resources\n\n- Conda [Building Packages](https://conda.io/docs/building/build.html)\n- [Anaconda.org dashboard](https://anaconda.org/catalyst/healthcareai)\n- Taken from the excellent [conda.io docs](https://conda.io/docs/build_tutorials/pkgs.html)\n- Also, some taken from this [Travis CI build](https://gist.github.com/yoavram/05a3c04ddcf317a517d5)#\n\n\n## Sphinx Progress\n\nIdeally, this project will have a user guide, (currently in the form of the docs folder) and method level documentation generated by sphinx.\n\n1. Install sphinx\n2. install \n\nFrom the `dox/_build` (you may need to create it if it doesn't exist) directory, run`sphinx-apidoc.exe -f -o ../ ../../healthcareai && sphinx-build.exe -b html ../ ./ && python -m http.server 8888 --bind 127.0.0.1`\n\n### Sphinx resources\n\n- [An idiot\u2019s guide to Python documentation with Sphinx and ReadTheDocs](https://samnicholls.net/2016/06/15/how-to-sphinx-readthedocs/)\n- [First Steps with Sphinx](http://www.sphinx-doc.org/en/stable/tutorial.html)\n- [Napoleon - Marching toward legible docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/)\n- [napoleon configuration](http://www.sphinx-doc.org/en/stable/ext/napoleon.html#configuration)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://healthcare.ai", "keywords": "machine learning healthcare data science", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "healthcareai", "package_url": "https://pypi.org/project/healthcareai/", "platform": "", "project_url": "https://pypi.org/project/healthcareai/", "project_urls": { "Homepage": "http://healthcare.ai" }, "release_url": "https://pypi.org/project/healthcareai/1.0/", "requires_dist": null, "requires_python": "", "summary": "Tools for healthcare machine learning", "version": "1.0" }, "last_serial": 3105172, "releases": { "0.1.7": [], "0.1.7rc2": [ { "comment_text": "", "digests": { "md5": "d326b5d86145de7fded370b20b87bb59", "sha256": "a32f1cc566b499b2546cc2740faba60df6fef006c7cb8f533034020bc0fd7a3d" }, "downloads": -1, "filename": "healthcareai-0.1.7rc2.tar.gz", "has_sig": false, "md5_digest": "d326b5d86145de7fded370b20b87bb59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23376, "upload_time": "2017-02-15T22:53:52", "url": "https://files.pythonhosted.org/packages/67/60/25d7f00832032328f78b7948c59f80f3362efd61dd854d28ae3001d02747/healthcareai-0.1.7rc2.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "9b7fdf2cbbf117e2eaf14043a4bf533b", "sha256": "db7c3f970cdf94d0cf2e43d9027cfa399c64c67d8f323c4ec37b7d707e2b76cf" }, "downloads": -1, "filename": "healthcareai-0.1.8.tar.gz", "has_sig": false, "md5_digest": "9b7fdf2cbbf117e2eaf14043a4bf533b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24909, "upload_time": "2017-02-17T01:03:47", "url": "https://files.pythonhosted.org/packages/3f/f7/6c008469634ced5fe72730c6603cecfb1d6c2633428e27ae9b6344e307fb/healthcareai-0.1.8.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "e40f4e947a750c8e225c11d2a2a822c1", "sha256": "5efcd9551e6276e51c2af3c4e7268b2d42c133a704f10bb2a3871f2452900456" }, "downloads": -1, "filename": "healthcareai-1.0.tar.gz", "has_sig": false, "md5_digest": "e40f4e947a750c8e225c11d2a2a822c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58560, "upload_time": "2017-08-18T02:22:20", "url": "https://files.pythonhosted.org/packages/d1/64/99352f8a44c482c8eb844c790f79fe9314245bc163e605b7c34945afbb08/healthcareai-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e40f4e947a750c8e225c11d2a2a822c1", "sha256": "5efcd9551e6276e51c2af3c4e7268b2d42c133a704f10bb2a3871f2452900456" }, "downloads": -1, "filename": "healthcareai-1.0.tar.gz", "has_sig": false, "md5_digest": "e40f4e947a750c8e225c11d2a2a822c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 58560, "upload_time": "2017-08-18T02:22:20", "url": "https://files.pythonhosted.org/packages/d1/64/99352f8a44c482c8eb844c790f79fe9314245bc163e605b7c34945afbb08/healthcareai-1.0.tar.gz" } ] }