fredymad / DiagnosisExtraction_ML

Pipeline for building Machine Learning Classifiers for the diagnosis of EHR text-data. We used this pipeline for our study, published here: https://doi.org/10.2196/23930.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DiagnosisExtraction_ML

Pipeline for building Machine Learning Classifiers tasked with extracting the RA diagnosis based on EHR data (Natural Language). This repository works with Python 3.6.

Note: we used this pipeline for our study, published here: https://doi.org/10.2196/23930. We identified Rheumatoid Arthritis patients in EHR-data from two different centers to examine the universal applicability.

Installation

Windows systems:

Prerequisite: Install Anaconda with python version 3.6+. This additionally installs the Anaconda Prompt, which you can find in the windows search bar. Use this Anaconda prompt to run the commands mentioned below.

Linux / Windows (dev) systems:

Prerequisite: conda environment (with jupyter notebook). Use the terminal to run the commands mentioned below.

Install Jupyter Notebook:

$ conda install -c anaconda notebook

Importing required modules

Before running, please install the dependencies.

Option 1: Create environment with conda (YML)

prerequisite: conda3

$ conda env create -f ml_env.yml
$ conda activate ml_env

Create kernel:

$ ipython kernel install --user --name diagnosis_ra

Deactivate environment:

$ conda deactivate

Option 2: pip

prerequisite: pip

$ pip install -r requirements.txt

Option 3: create custom kernel with conda (Bash script)

prerequisite: conda3

$ bash build_kernel.sh

How to start

Start a notebook session in the terminal

$ notebook

Which will start a notebook session in the browser from which you can open the pipeline file: Notebook Diagnosis

Pipeline

alt text Pipeline displaying the general workflow, where the green sections are performed automatically and the blue parts require manual evaluation. A simple annotation (binary Yes or No) will suffice, thus reducing the mental load of the physician.

Citation

If you were to use this pipeline, please cite our paper:

Maarseveen T, Meinderink T, Reinders M, Knitza J, Huizinga T, Kleyer A, Simon D, van den Akker E, Knevel R Machine Learning Electronic Health Record Identification of Patients with Rheumatoid Arthritis: Algorithm Pipeline Development and Validation Study JMIR Med Inform 2020;8(11):e23930 URL: https://medinform.jmir.org/2020/11/e23930 DOI: 10.2196/23930 PMID: 33252349

About

Pipeline for building Machine Learning Classifiers for the diagnosis of EHR text-data. We used this pipeline for our study, published here: https://doi.org/10.2196/23930.


Languages

Language:Jupyter Notebook 89.4%Language:Python 10.6%Language:Shell 0.0%