Project case study
NBA Player Sentiment Engine
Basketball conversations are full of sarcasm, slang and context. I explored what happens when sentiment tools try to turn that conversation into a score, and where those scores stop being useful.
My role: Coursework analysis and model-comparison project published in my portfolio repository.
Watch the interactive walkthroughHow it works
Collect and clean comments
Player-related text becomes a consistent analysis input.
Python retrieves and cleans discussion text before passing the combined text to sentiment methods. The portfolio example uses invented comments.
Compare sentiment methods
Different methods assign different interpretations.
VADER applies a lexical sentiment score; the project also explores TF-IDF and pretrained transformer methods. No transformer is trained from scratch here.
Inspect disagreements
Sarcasm exposes the gap between a label and meaning.
The analysis compares method outputs against labeled examples. Human and AI-assisted labels make this exploratory evidence rather than an independent gold benchmark.
Evaluate with context
Aggregate scores depend on the weighting choice.
One VADER aggregation uses logarithmic engagement weighting: 1 + log1p(max(upvotes, 0)). Scores summarize the sampled comments, not all fans.
A score needs context.
The pipeline collects and cleans player-related discussion, applies sentiment methods and compares the outputs. The code explores simple averages and engagement-weighted scores, alongside classification experiments. The interesting part is inspecting which comments cause the methods to disagree, rather than assuming the largest model understands the conversation best.
- Focus
- Python, Reddit text processing, VADER, TF-IDF and pretrained transformers
- Status
- Coursework analysis; evaluation results require bounded interpretation
How it works
Python cleans player-related text before sentiment analysis. VADER supplies lexical scores, while the project explores TF-IDF and pretrained transformers. Separate aggregation functions compare equal weighting with logarithmic or stronger engagement weighting.
A decision that mattered
Engagement weighting changes what the score represents. One implementation uses a logarithm to reduce the influence of very popular comments. That produces a different view from treating every comment equally, and neither is a direct measure of public opinion.
What I would test next
I would rerun the comparison on a clearly documented, independently reviewed test set. The current labels include human and AI assistance, so they need that context when interpreting results.