Getting Stuck on the Kaggle Disaster Tweets Project (and How I’m Shipping V1 Anyway)

I’ve been working on the Kaggle Disaster Tweets classification project, and for a while, progress felt good. I built a baseline model using TF-IDF and Logistic Regression and managed to get an F1 score of 0.82 without using a pipeline.
 
Then I decided to “do things properly” and refactor everything into a scikit-learn pipeline — and that’s where I got stuck.
 
What broke (or so I thought)

After building the pipeline and calling predict on the validation and test data, the output was a one-dimensional array of predictions. At first glance, this felt wrong. I was expecting something more complex, probably because before the pipeline I was manually handling the TF-IDF matrix with thousands of features.

I assumed something was broken.
 
It wasn’t.

What I misunderstood

What I eventually realized is that:
 
A pipeline hides the feature engineering steps
 
predict() is supposed to return a 1-D array of labels
 
The many TF-IDF features still exist — they’re just internal to the pipeline
 
 
In other words, the pipeline was working exactly as intended. My mental model just hadn’t caught up yet.
 
This was one of those moments where learning ML feels harder not because the code is wrong, but because your understanding is upgrading.
 
Why this stalled me
 
Instead of simplifying, I paused. I started second-guessing:
 
whether I should remove the pipeline
 
whether I misunderstood prediction outputs
 
whether I should refactor everything again
 

Takeaway

That pause turned into no blog updates for a while.
 
The decision: ship V1
 
I’ve decided to stop over-optimizing and submit this as V1:
 
Baseline TF-IDF + Logistic Regression
 
Clean pipeline
 
F1 score around 0.82
 
Correct Kaggle submission format
 
 
V1 doesn’t need to be clever.
It just needs to run end-to-end and be understood.
 
What V2 will improve later
 
Better feature analysis
 
Threshold tuning
 
Error analysis on false positives / negatives
 
Possibly experimenting with different models
 
 
But none of that matters if V1 never ships
Getting stuck wasn’t a failure — it was a sign that I was moving from “toy ML” to more production-style workflows. Pipelines are supposed to feel confusing at first.
 
The lesson for me:
 
> When in doubt, simplify, ship, and iterate.

Leave a Comment