ML Data Stats (fenliu-feedback-stats)¶
The fenliu-feedback-stats command gives you a snapshot of the ReviewFeedback data being collected, and tells you whether it's mature enough to proceed with ML training (Phase 5).
Running the command¶
Locally:
fenliu-feedback-stats # all-time report
fenliu-feedback-stats --days 30 # last 30 days only
Inside a running container:
podman exec <container-name> fenliu-feedback-stats
podman exec <container-name> fenliu-feedback-stats --days 30
The command reads from the same database configured via DATABASE_URL and does not start the web server.
Report sections¶
Summary¶
Total ReviewFeedback rows, split by decision (approved, rejected, score_adjusted) with percentages. This tells you how many reviews have been recorded and whether the dataset is reasonably balanced.
Date Range & Collection Rate¶
The oldest and newest created_at timestamps, total days of data, and average reviews per week. Since snapshot collection only started in v0.7.0 (2026-03-14), earlier rows may lack snapshot fields.
Snapshot Completeness¶
For each of the 12 snapshot columns (e.g. content_snippet, spam_score_at_review, hashtag_count), shows how many rows have non-NULL values. A ✓ means that column is ≥90% complete; ! means it needs attention.
Rows with NULL snapshots are from before v0.7.0 and cannot be used for ML training. This section tells you what fraction of your data is actually usable.
Top Instances in Rejected Posts¶
The 10 Fediverse instances that appear most often in rejected posts. Useful for deciding whether to add new suffix blocking rules in Settings (e.g. if bsky.brid.gy shows up 50 times, a suffix block may be worthwhile).
Per-Stream Breakdown¶
Approved and rejected counts per hashtag stream, so you can see which streams generate the most useful training signal or the most spam.
ML Readiness Assessment¶
A checklist of the criteria from ML_INTEGRATION_GUIDE.md (see the file in the repository root):
| Criterion | Threshold | Why |
|---|---|---|
| Minimum reviews | ≥ 500 | Classifier needs a minimum sample size |
| Preferred reviews | ≥ 1,000 | Better generalisation |
| Days of data | ≥ 180 (6 months) | Enough variety across content cycles |
| Snapshot completeness | ≥ 90% | Most rows must have usable features |
| Class balance | Neither side > 85% | Severely imbalanced data degrades classifiers |
The command prints READY or NOT READY along with how many criteria are met.
Interpreting the output¶
- NOT READY on "Days of data": This is expected early on. Snapshot collection started 2026-03-14 — you need to wait until ~2026-09-14 before this criterion passes. Keep reviewing normally and re-run the command periodically.
- NOT READY on "Snapshot completeness": Pre-v0.7.0 rows lack snapshot fields. As you continue reviewing, new rows will have complete snapshots and this percentage will rise.
- NOT READY on "Class balance": If you're approving almost everything (or rejecting almost everything), the ML model will have difficulty learning the boundary. Consider whether your approval threshold is calibrated correctly.
- READY: You can proceed to Phase A of
ML_INTEGRATION_GUIDE.md(see the file in the repository root) — exporting a training dataset and validating data quality.