Predicting engagement and uncovering structure in AI discussions on Reddit
Three tasks: controversial comment detection, comment count prediction, and unsupervised topic groups
This page shows how simple machine learning models can read text and give useful signals about AI conversations. We look at three questions.
Logistic regression is able to separate controversial and non controversial comments with an area under the ROC curve close to 0.69. Gradient boosted trees that use both metadata and text embeddings predict comment counts with an RMSE around 0.57 on the log scale. Unsupervised clustering shows that most posts share a common vocabulary about general AI use, while a few very specific patterns form tiny separate clusters.
The first task predicts whether a long comment is marked as controversial.
We focus on comments with more than 200 characters from seven AI related
subreddits. The label comes from the Reddit field controversiality.
We balance the data to keep about one controversial comment for three non controversial ones. The model uses basic text features and simple numeric signals.
| Model | AUC ROC | AUC PR | Accuracy | F1 score |
|---|---|---|---|---|
| Logistic regression | 0.694 | 0.406 | 0.614 | 0.639 |
| Random forest | 0.672 | 0.394 | 0.445 | 0.440 |
The second task predicts how many comments a submission will receive. This is a proxy for community engagement or attention.
The target variable is the natural log of one plus the comment count. This reduces the effect of rare very large threads and makes the distribution closer to normal.
| Feature set | Best maxIter | RMSE test | MAE test | R squared test |
|---|---|---|---|---|
| Metadata plus TF IDF | 30 | 0.601 | 0.325 | 0.673 |
| Metadata plus Word2Vec | 30 | 0.574 | 0.313 | 0.696 |
This task explores whether simple clustering can reveal meaningful structure in AI-related submissions. We apply KMeans to TF-IDF features from the title and selftext fields.
Most submissions fall into a single broad cluster focused on general AI usage. A few very small clusters reflect highly specific and repeated patterns. Below are three representative clusters that illustrate the range of themes.
Top words:
This cluster contains nearly all submissions and reflects broad conversations about how people use AI tools and models.
Top words:
This tiny cluster captures a repeated plugin announcement or template. It is not a broad theme but shows how boilerplate content forms its own pattern.
Top words:
This cluster reflects an academic or classroom-focused message. Though small, it highlights a positive and learning-oriented tone.
All models run on a Spark cluster. Data is read from S3, processed in Spark DataFrames and stored again as Parquet, CSV and PNG plots.
The corresponding Python files live under code/ml/ and write
metrics to data/csv/ and figures to data/plots/.