GithubHelp home page GithubHelp logo

omarsar / clinical_nlp_elastic Goto Github PK

View Code? Open in Web Editor NEW
34.0 5.0 4.0 1017 KB

Clinical NLP Analysis with Elasticsearch and Kibana

Jupyter Notebook 97.89% Python 2.11%
elastic elasticsearch kibana machine-learning nlp linguistics mental-health

clinical_nlp_elastic's Introduction

Online Mental Disorder Analysis with Elasticsearch and Kibana


alt txt

Project Summary

In this presentation (slide available here), I provide a basic analysis and feature engineering pipeline to discover interesting and hidden linguistic phenomena and emotional behaviors of online mental disorder users. The first phase of the analysis focus on exploring basic linguistic and social cues such as emoticons, stopwords, hashtags, social mentions, etc. The goals of the presentation are the following:

  • To broadly show how to leverage Elasticsearch's ingest pipeline and custom analyzers for preprocessing and feature engineering
  • To introduce common best practices for dealing with natural language data
  • To discover insights that assist to improve feature engineering and ML models

Prerequisites

To fully understand the material in this project, it assumes basic knowledge of Elasticsearch and Python. The Elastic learning page and official reference are great places to start learning about Elasticsearch and Kibana.

Requirements

Below are the requirements for this project:

Framework

In this project, I show how to insert the data discussed above into Elasticsearch to be able to conduct interesting featuring engineering and anlysis using Kibana and the developer tools. I make heavy use of the ingest pipeline to define processors through which the data will be fed before being indexed (stored) into Elasticsearch via the bulk API using elasticsearch Python module. The code (notebook) used to perform the bulk insert can be found in this repository.

alt txt

Data

The participants used in this analysis are collected from Twitter based on their self-reported status. The self-reported mental disorder cases were collected via a filter, "I am diagnosed with X". I only focus on bipolar disorder and borderline personality disorder self-reported cases. A seperate control group was randomly collected using the Twitter public API. All cases were manually verified and checked for data quality control. More information on how to collect such dataset can be found in this paper.

There are some ethical concerns about publicly sharing the dataset so if you are seriously interested in using it for research purposes please feel free to reach out to me at [email protected]. There is an alternative dataset (collected from Reddit), similar to this one, that can also be obtained in a similar process. Ideally, it doesn't matter what dataset we are using, the goal is to provide a framework that can perform the analysis on various kinds of datasets coming from different sources.

Dashboard

The visualization dashboard built using Kibana looks as follows:

alt txt

Other Resources

The full presentation slides accomponying this project can be found here

Project Status

  • Phase 1 - Proposal of indexing, feature engineering, and analytics (read more)
  • Phase 2 (Coming soon!) - More details on project, models, data, research, etc.

Future Ideas

  • Create sample data to reproduce experiments and analyses
  • General NLP pipeline for mental disorder analysis and text analytics
  • Integrate logstash for gathering, processing, and indexing more cases
  • Build a machine learning or deep learning dedicated API to automatically perform prediction of new mental disorder cases

Contact Information

clinical_nlp_elastic's People

Contributors

omarsar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.