Back To Projects

Detecting Racial and Ethnic Bias in Social Media Posts Using Machine Learning

Mira C.

This study investigates the use of machine learning to detect racial and ethnic bias in social media posts using TF-IDF text embeddings and multiple classification models. Results show that Random Forest achieved the highest overall accuracy of 93.45%, demonstrating the potential of machine learning to support automated bias detection despite challenges posed by imbalanced data and the complexity of language.


Social media platforms contain large amounts of user-generated content, making it difficult for humans to identify harmful language manually. This project investigates whether machine learning can be used to detect racial and ethnic bias in social media posts. The dataset used was Hate Speech and Bias against Asians, Blacks, Jews, Latines, and Muslims: A Dataset for Machine Learning and Text Analytics, which contains 5,880 labeled tweets collected between 2020 and 2022. Several machine learning models were trained and evaluated using TF-IDF (Term Frequency-Inverse Document Frequency) text embeddings, including K-Nearest Neighbors (KNN), Random Forest, Multi-Layer Perceptron (MLP), AdaBoost, and Support Vector Classification (SVC). Random Forest achieved the highest accuracy (93.45%) and precision (57.14%), while the Multi-Layer Perceptron achieved the highest recall (11.54%) and F1 score (0.141). These findings suggest that machine learning can assist in detecting racial and ethnic bias in social media posts, although performance remains limited due to the imbalanced dataset and the complexity of language.

Explore More!

Source Code
Mira C.
Matan Gans
Computer Science MS from Brown

Related Projects

Quantifying the True Trade Value of NBA Players: A Data Driven Approach

This study investigates the drivers of NBA player valuation by analyzing performance metrics, advanced statistics, and salaries from the 2022–2023 season, using regression models to assess how performance relates to trade value. The findings show that while team payroll strongly correlates with team performance, individual player salaries often diverge from statistical output, highlighting the influence of factors beyond on-court performance.
Ali Q.
Mentored by Rami Abi-Akl
workspace_premium
Automated Highlight Generation of Amateur Table Tennis Videos Using Machine Learning

This study develops a machine learning system using a Temporal Segment Network with a ResNet-50 backbone to automatically identify active gameplay and generate highlights from amateur table tennis videos. The system achieved over 90% test accuracy while reducing viewing time by approximately 60 to 70%, demonstrating an efficient approach to automated sports video review.
Vishal S.
Mentored by Abdulla Kerimov
workspace_premium
Landfill Net: A Convolutional Neural Network (CNN) Architecture for the Detection of Landfills from Satellite Imagery in the Continental United States

This project presents a Convolutional Neural Network (CNN) model that identifies landfills in the U.S. using image data, achieving a 97.1% test accuracy. By supporting the creation of a national landfill database, the model can help detect illegal sites and guide the expansion of methane capture systems to reduce greenhouse gas emissions.
Anika S.
Mentored by Ying Hang Seah