Data and AI
Esports Toxicity Sentiment Analyzer
A TF-IDF and logistic regression classifier scores every message in a simulated 33-minute game chat and plots the rolling toxic-message rate against match events. It reached 0.951 accuracy on held-out data, and the chart shows toxicity rising to 50-70% right after every negative event.
Overview

Install
- Go to the project folder.
cd "06-toxicity-sentiment-analyzer"
- Generate the chat log and match events.
../.venv10projects/bin/python generate_data.py # writes data/chat_log.csv, data/match_events.csv
- Train and evaluate the classifier.
../.venv10projects/bin/python train_classifier.py # trains + evaluates the classifier, saves model.joblib
- Score the full log and save the chart.
../.venv10projects/bin/python analyze.py # scores the full log, saves toxicity_timeline.png
The commands use the shared .venv10projects venv one level up. It already has pandas, scikit-learn and matplotlib.
Docs
The full documentation covers how it works, configuration and results.