Publication

Automatic gender detection in Twitter profiles for health-related cohort studies

Downloadable Content

Persistent URL
Last modified
  • 05/21/2025
Type of Material
Authors
    Yuan-Chi Yang, Emory UniversityMohammed A Al-Garadi, Emory UniversityJennifer S Love, Oregon Health & Science UniversityJeanmarie Perrone, University of PennsylvaniaMd Sarker, Emory University
Language
  • English
Date
  • 2021-04-01
Publisher
  • Oxford University Press (OUP)
Publication Version
Copyright Statement
  • © The Author(s) 2021. Published by Oxford University Press on behalf of the American Medical Informatics Association.
License
Final Published Version (URL)
Title of Journal or Parent Work
Volume
  • 4
Issue
  • 2
Start Page
  • ooab042
End Page
  • ooab042
Grant/Funding Information
  • Research reported in this publication was supported by the National Institute on Drug Abuse (NIDA) of the National Institutes of Health (NIH) under award number R01DA046619. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH.
Supplemental Material (URL)
Abstract
  • Objective: Biomedical research involving social media data is gradually moving from population-level to targeted, cohort-level data analysis. Though crucial for biomedical studies, social media user's demographic information (eg, gender) is often not explicitly known from profiles. Here, we present an automatic gender classification system for social media and we illustrate how gender information can be incorporated into a social media-based health-related study. Materials and Methods: We used a large Twitter dataset composed of public, gender-labeled users (Dataset-1) for training and evaluating the gender detection pipeline. We experimented with machine learning algorithms including support vector machines (SVMs) and deep-learning models, and public packages including M3. We considered users' information including profile and tweets for classification. We also developed a meta-classifier ensemble that strategically uses the predicted scores from the classifiers. We then applied the best-performing pipeline to Twitter users who have self-reported nonmedical use of prescription medications (Dataset-2) to assess the system's utility. Results and Discussion: We collected 67 181 and 176 683 users for Dataset-1 and Dataset-2, respectively. A meta-classifier involving SVM and M3 performed the best (Dataset-1 accuracy: 94.4% [95% confidence interval: 94.0-94.8%]; Dataset-2: 94.4% [95% confidence interval: 92.0-96.6%]). Including automatically classified information in the analyses of Dataset-2 revealed gender-specific trends-proportions of females closely resemble data from the National Survey of Drug Use and Health 2018 (tranquilizers: 0.50 vs 0.50; stimulants: 0.50 vs 0.45), and the overdose Emergency Room Visit due to Opioids by Nationwide Emergency Department Sample (pain relievers: 0.38 vs 0.37). Conclusion: Our publicly available, automated gender detection pipeline may aid cohort-specific social media data analyses (https://bitbucket.org/sarkerlab/gender-detection-for-public).
Author Notes
  • Yuan-Chi Yang, PhD, Department of Biomedical Informatics, School of Medicine, Emory University, 101 Woodruff Circle, 4th Floor East, Atlanta, GA 30322, USA. Emaik=l: yuan-chi.yang@emory.edu
Keywords
Research Categories
  • Engineering, Biomedical
  • Health Sciences, Medicine and Surgery

Tools

Relations

In Collection:

Items