validation F1
Fixed stratified UCI rebuild holdout.
Cost-aware SMS spam classification where probability quality, threshold policy, artifact integrity, and deployment are evaluated as separate decisions.
A good classifier can still make the wrong operating decision. A false positive can hide a legitimate message, so threshold policy should reflect an explicit cost assumption rather than defaulting silently to 0.50.
I rebuilt and evaluated the UCI classification workflow, compared models and thresholds, defined the artifact contract, and designed the FastAPI, Docker, and Streamlit delivery boundaries.
Validation F1 0.9291 with average precision 0.9788 on the fixed stratified rebuild holdout.
Python · scikit-learn · FastAPI · Docker · Streamlit · TF-IDF
Rebuild tested
Fixed stratified UCI rebuild holdout.
Ranking evidence for the imbalanced target.
Probability accuracy evidence.
Compared with threshold 0.50 under the same 5:1 cost policy. Not financial savings.
SpamShield treats the model, predicted probability, operating threshold, and deployment artifact as separate engineering decisions.
A good classifier can still make the wrong operating decision. A false positive can hide a legitimate message, so threshold policy should reflect an explicit cost assumption rather than defaulting silently to 0.50.
Classification quality alone does not define a safe operating decision. Probability quality, threshold policy, artifact integrity, and deployment behavior all affect how the model should be used.
I rebuilt and evaluated the UCI classification workflow, compared models and thresholds, defined the artifact contract, and designed the FastAPI, Docker, and Streamlit delivery boundaries.
The rebuild packages a reproducible classifier behind testable API and Streamlit delivery surfaces while preserving the historical public demo as a separate reference.
The rebuild uses an approved UCI retrieval path with bounded downloads and archive validation before training begins.
TF-IDF preprocessing feeds Naive Bayes and Logistic Regression comparison. Threshold selection is then evaluated separately under the recorded false-positive cost policy.
Rebuild numbers are reported as validation evidence, not production performance.
The evaluation is reproducible, but the same fixed holdout participates in model comparison and threshold selection, so selection optimism can remain.
Training, artifacts, API delivery, container runtime, and Streamlit presentation share explicit contracts rather than relying on notebook state.
The cost policy makes the operating decision interpretable, but it also means the preferred threshold depends on a stated business assumption rather than a universally optimal cutoff.
The rebuild is not described as production performance. The historical public demo is a reference until the rebuilt artifact deployment and live privacy behavior are verified.
A historical Streamlit demo URL is recorded, but direct availability could not be independently reverified in this environment. It is withheld from recruiter-facing links and is not evidence that the 2026 rebuilt artifacts are deployed.
The rebuilt source and deployment path are not linked in this portfolio prototype until remote source access and the deployed artifact identity are reverified together.
Technical status: Rebuild tested, historical demo availability unverified
Repository status: Historical public demo is available, but rebuilt source deployment remains a separate verification milestone.
Produce the intended artifact bundle, deploy the rebuilt FastAPI path, verify live health and prediction behavior, reconnect Streamlit to the same artifact contract, and verify that submitted SMS text is absent from live logs and persistent storage.