Skip to main content

Posts

Showing posts from February, 2017

Sentiment analysis on comments in a chronic pain forum

I currently work in a lab which studies the interaction between chronic pain and brain function.  So I figured a semi-productive way to merge my current work with the aims of this blog would be to practice extracting clinical-pain-related data from the internet.  Specifically, because I regularly talk to patients who have tried multiple treatments for their chronic pain, I wanted to get an idea of what the internet thought of these treatments. I used Beautifulsoup in Python to scrape user comments from the first chronic pain forum listed on Google (www.spine-health.com).  I scraped over 100k comments from forums related to chronic pain, lower back pain, upper back pain, and neck/cervical pain. Interested in seeing which treatments were most associated with the most positive (or negative comments), I assessed the tone of forum comments using Sentiment Analysis in Python.  Some examples of comments with their associated sentiment scores are listed below (scores range from -1 to 1, wh

Introduction

Hi.  I'm a neuroscientist who sometimes gets frustrated looking at the same kind of data over and over!  I want to try to solve new problems and learn some new techniques and languages, and this blog is a way for me to keep track of it.  As such, this blog is not meant to be a set of exhaustive analyses.  Rather, I'm trying to keep it as informal as possible, while journaling the new things I am learning.  I hope you enjoy it! A couple notes: 1) Most of my coding experience is in MATLAB -- I will TRY to avoid using it here as much as possible and instead focus on languages and techniques with which I am less familiar.  This blog will mostly involve experimenting with Python. 2) I will eventually make codes of presented work available. 3) You can find more details about my experience at www.linkedin.com/in/alexbaria/