Migration identity#
- Canonical identifier:
S03.1(GitHub issue type: subtask). - Legacy identifier:
C03.1(retained asold_identifier). - Parent epic:
E03. - Milestone:
M1 — IntentGuard Weekend MVP.
Objective#
Fit one deterministic TF-IDF plus logistic-regression pipeline on U02 training data with explicit hyperparameters.
Rationale#
This creates the required lexical comparison and early working baseline.
Parent identifier#
E03.
Source task#
T-003.
Traceability#
Primary: T-003, FR-002. Secondary: AC-002.
Prerequisites#
U02 complete; baseline hyperparameters resolved and recorded before test evaluation.
Likely files#
configs/default.toml, src/intentguard/baseline.py, src/intentguard/metrics.py, scripts/train_baseline.py, tests/unit/test_baseline.py.
Implementation boundary#
One scikit-learn pipeline using shared labels/splits and deterministic seed.
MUST scope#
Fit, predict, probability output, explicit estimator/vectorizer settings, and shared metric integration.
Explicit non-goals#
Other estimators, tuning sweeps, embeddings, calibration add-ons, or test-set selection.
Acceptance criteria#
Repeated fits on identical inputs produce matching predictions; class/probability order matches the canonical label map; configuration is serialized.
Validation commands#
make baseline && uv run pytest tests/unit/test_baseline.py tests/unit/test_metrics.py -q.
Expected evidence#
Configured pipeline, seeded fit output, prediction/probability tests, and data fingerprint.
Fallback and status consequence#
Reduced iterations remain valid only if convergence and required behavior are measured; another estimator is Partial and fails strict MVP.
Stop condition#
Stop for unresolved hyperparameters, convergence failure, nondeterminism, label mismatch, or test-driven tuning.
Definition of ready#
U02 outputs and baseline configuration are frozen.
Definition of done#
Pipeline behavior passes deterministic and probability-contract tests.
Labels#
type:subtask, priority:MUST, area:baseline
Estimate#
1.25 hours.