• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
C* Summit 2013: Suicide Risk Prediction Using Social Media and Cassandra by Ken Krugler
 

C* Summit 2013: Suicide Risk Prediction Using Social Media and Cassandra by Ken Krugler

on

  • 4,893 views

In this presentation, Ken will describe a portion of an early-phase project that uses social media data (tweets, Facebook posts, etc.) from service personnel to predict suicide rates. There's a lot of ...

In this presentation, Ken will describe a portion of an early-phase project that uses social media data (tweets, Facebook posts, etc.) from service personnel to predict suicide rates. There's a lot of motivation to provide better data for military psychologies, since more military wind up taking their own lives than are killed in the line of duty. By analyzing social media data that is voluntarily provided by personnel, plus a predictive analytics system, we can provide assessments that help mental health workers focus their time and energy on the most at-risk individuals. This project uses Cassandra as the scalable storage system for this social media data, which is then analyzed in a distributed environment using Hadoop. The project also uses the Solr search support from DataStax Enterprise to provide ways for users to dig into the underlying data, which is critical when understanding the assigned risk levels.

Statistics

Views

Total Views
4,893
Views on SlideShare
1,064
Embed Views
3,829

Actions

Likes
1
Downloads
21
Comments
0

29 Embeds 3,829

http://planetcassandra.org 1289
http://www.planetcassandra.org 806
http://www.scaleunlimited.com 776
http://architects.dzone.com 662
http://java.dzone.com 106
http://planetca.w11.wh-2.com 48
http://planetcassandra.com 21
http://www.newsblur.com 19
http://hivereader.com 16
http://localhost 14
http://cloud.feedly.com 10
http://www.planetcassandra.com 9
http://reader.faltering.com 8
https://twitter.com 7
http://www.feedspot.com 6
http://planetcassandra.net 6
http://www.planetcassandra.net 5
http://newsblur.com 4
http://webcache.googleusercontent.com 3
http://cloud 3
http://127.0.0.1 2
http://digg.com 2
http://translate.googleusercontent.com 1
http://planetcassandra.prakashinfotech.com 1
http://131.253.14.98 1
http://www.inoreader.com 1
http://www.dzone.com 1
http://yoleoreader.com 1
http://www.google.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    C* Summit 2013: Suicide Risk Prediction Using Social Media and Cassandra by Ken Krugler C* Summit 2013: Suicide Risk Prediction Using Social Media and Cassandra by Ken Krugler Presentation Transcript

    • #CASSANDRA13Ken  Krugler  |  President,  Scale  UnlimitedSuicide Prevention Using Social Media and Cassandra
    • #CASSANDRA13What we will discuss today...*Using Cassandra to store social media content*Combining Hadoop workflows with Cassandra*Leveraging Solr search support in DataStax Enterprise*Doing good with big dataThis material is based upon work supported by the Defense Advance Research Project Agency (DARPA),and Space Warfare Systems Center Pacific under Contract N66001-11-4006. Any opinions, findings, andconclusions or recommendations expressed in this material are those of the authors(s) and do notnecessarily reflect the views of the Defense Advance Research Program Agency (DARPA) and Space andNaval Warfare Systems Center Pacific.Fine Print!
    • #CASSANDRA13Obligatory Background*Ken Krugler, Scale Unlimited - Nevada City, CA*Consulting on big data workflows, machine learning & search*Training for Hadoop, Cascading, Solr & Cassandra
    • #CASSANDRA13Durkheim Project OverviewIncluding things we didnt work on...
    • #CASSANDRA13Whats the problem?*More soldiers die from suicide than combat*Suicide rate has gone up 80% since 2002*Civilian suicide rates are also climbing*More suicides than homicides*Intervention after an "event" is often too late
    • #CASSANDRA13What is The Durkheim Project?*DARPA-funded initiativeto help militaryphysicians*Uses predictive analyticsto estimate suicide riskfrom what people writeonline*Each user is assigned asuicidality risk rating ofred, yellow or green.Émile Durkheim
    • #CASSANDRA13Current Status of Durkheim*Collaborative effort involving Patterns and Predictions,Dartmouth Medical School & Facebook*Details at http://www.durkheimproject.org/*Finished phase I, now being rolled out to wider audience
    • #CASSANDRA13Predictive Analytics*Guessing at state of mind from text-"There are very few people in this world that know the REALme."-"I lay down to go to sleep, but all I can do is cry"*Uses labeled training data from clinical notes*Phase I results promising, for small sample set-"ensemble" of predictors is a powerful ML technique
    • #CASSANDRA13Clinician Dashboard*Multiple views on patient*Prediction & confidence*Backing data (key phrases,etc)
    • #CASSANDRA13Data CollectionWhere _do_ you put a billion text snippets?
    • #CASSANDRA13Saving Social Media Activity*System to continuous save new activity-Scalable data store*Also needs a scalable, reliable way to access data-Processed in bulk (workflows)-Accessed at individual level-Searched at activity level
    • #CASSANDRA13Data Collection*Pink is what wewrote*Green is inCassandra*Key data path in redExciting SocialMedia ActivityGigyaDaemonDurkheimSocial APIUsersTableDurkheimAppGigyaServiceActivityTable
    • #CASSANDRA13Designing the Column Families*What queries do we need to handle?-Always by user id (what we assign)*We want all the data for a user-Both for Users table, and Activities table-Sometimes we want a date range of activities*So one row per user-And ordered by date in the Activities table
    • #CASSANDRA13Users Table (Column Family)*One row per user - row key is a UUID we assign*Standard "static" columns-First name, last name, opt_in status, etc.*Easy to add more xxx_id columns for new servicesrow key first_name last_name facebook_id twitter_id opt_in
    • #CASSANDRA13Activities Table (Column Family)*One row per user - row key is a UUID we assign*One composite column per social media event-Timestamp (long value)-Source (FB, TW, GP, etc)-Type of column (data, activity id, user id, type of activity)row key ts_src_data ts_src_id ts_src_providerUid ts_src_type
    • #CASSANDRA13Two Views of Composite Columns*As a row/column view*As a key-value map 213_FB_data213_FB_id213_FB_providerUid213_FB_type"I feel tired""FB post #32""FB user #66""Status update""uuid1""uuid1" 213_FB_data 213_FB_id 213_FB_providerUid 213_FB_type"I feel tired" "FB post #32" "FB user #66" "Status update"
    • #CASSANDRA13Implementation Details*API access protected via signature*Gigya Daemon on both t1.micro servers-But only active on one of them*Astyanax client talks to Cassandra*Cluster uses 3 m1.large serversDurkheimSocial APIDurkheimAppAWS LoadBalancerEC2 m1.largeserversDurkheimSocial APIEC2 t1.microservers
    • #CASSANDRA13Predictive Analytics at ScaleRunning workflows against Cassandra data
    • #CASSANDRA13How to process all this social media goodness?*Models are defined elsewhere*These are "black boxes" to us213_FB_data 213_FB_id 213_FB_providerUid 213_FB_type"I feel tired" "FB post #32" "FB user #66" "Status update"307_TW_data 307_TW_id 307_TW_providerUid 307_TW_type"Where am I?" "Tweet #17" "TW user #109" "Tweet"FeatureExtractionModelmodel rating probability keywords
    • #CASSANDRA13Why do we need Hadoop?*Running one model on one user is easy-And n models on one user is still OK*But when a model changes...-all users with the model need processing
    • #CASSANDRA13Batch processing is OK*No strict minimum latency requirements*So we use Hadoop, for scalability and reliability
    • #CASSANDRA13Hadoop Workflow Details*Implemented using Cascading*Read Activities Table using Cassandra Tap*Read models from MySQL via JDBC
    • #CASSANDRA13Hadoop Bulk Classification WorkflowConvert to CassandraWrite Classification Result TableRun Classifier modelsCoGroup by user profile IDConvert from CassandraRead User Profiles TableConvert from CassandraRead Social Media Activity Table
    • #CASSANDRA13Workflow Issues*Currently manual operation-Ultimately needs a daemon to trigger (time, users, models)*Runs in separate cluster-Lots of network activity to pull data from Cassandra cluster-With DSE we could run on same cluster*Fun with AWS security groups
    • #CASSANDRA13Solr SearchPoking at the data
    • #CASSANDRA13Solr Search*Model results include key terms for classification result-"feel angry" (0.732)*Now you want to check actual usage of these terms
    • #CASSANDRA13Poking at the Data*Hadoop turns petabytes intopie-charts*How do you verify results?*Search works really well here
    • #CASSANDRA13Solr Search*Want "narrow" table for search-Solr dynamic fields are usually not a great idea-Limit to 1024 dynamic fields per document*So well replicate some of our Activity CF data into a new CF*Dont be afraid of making copies of data
    • #CASSANDRA13The "Search" Column Family*Row key is derived from Activity CF UUID + target column name*One column ("data") has content from that row + column inActivity CFrow key "data""uuid1_213_FB "I feel tired""uuid1" 213_FB_data 213_FB_id"I feel tired" "FB post #32"Activity Column FamilySearch Column Family
    • #CASSANDRA13Solr Schema*Very simple (which is how we like it)*Direct one-to-one mapping with Cassandra columns*Hits have key field, which contains UUID/Timestamp/Service<fields><field name="key" type="string" indexed="true" stored="true" /><field name="data" type="text" indexed="true" stored="true" /></fields>
    • #CASSANDRA13Combined Cluster*One Cassandra Cluster can allocate nodes for Hadoop & Search
    • #CASSANDRA13SecurityLocking things down
    • #CASSANDRA13The Most Important Detail*We dont have any personal medical data!!!*We dont have any personal medical data!!!*We dont have any personal medical data!!!
    • #CASSANDRA13Three Aspects of Security*Server-level-ssh via restricted private key*API-level-validate requests using signature-secure SHA1 hash*Services-level-Restrict open ports using security groups
    • #CASSANDRA13SummaryBringing it all home
    • #CASSANDRA13*You can effectively use Cassandra as:A repository for social media dataThe data source for workflowsA search index, via Solr integrationKey Points...
    • #CASSANDRA13*It is possible to do more with big data than optimize ad yieldsAnd the Meta-Point
    • #CASSANDRA13THANK YOU