IntentGuard

S03.1 — Implement the TF-IDF logistic-regression baseline

Planning / historicaltaskdelivery

Historical

Planning material. It summarizes and links to the authoritative specification and the current measured state — it does not replace either, and it is not current engineering truth.

Migration identity#

  • Canonical identifier: S03.1 (GitHub issue type: subtask).
  • Legacy identifier: C03.1 (retained as old_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.

Related in repository

Open in full graph →
DOCUMENTED_BYDOCUMENTED_BY — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.md § S03.1 — Implement the TF-IDF logistic-regression baselineREFERENCESREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.mdREFERENCESREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.mdPART_OF — source: docs/backlog/TRACEABILITY.md § Source tasksPART_OF — source: docs/backlog/TRACEABILITY.md § Source tasksPART_OF — source: docs/backlog/TRACEABILITY.md § Functional requirementsREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.md § TraceabilityREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.md § TraceabilityREFERENCES — source: docs/backlog/tasks/C03.1-tfidf-logistic-baseline.md § TraceabilitySATISFIES — source: docs/specification/docs/TRACEABILITY.md § Functional traceabilityREFERENCES — source: docs/backlog/umbrellas/U03-tfidf-baseline.md § TraceabilityREFERENCES — source: docs/backlog/umbrellas/U03-tfidf-baseline.md § TraceabilityREFERENCES — source: docs/backlog/umbrellas/U03-tfidf-baseline.md § TraceabilityCURRENTdocument: S03.1 — Implement the TF-IDF logistic-regression baselineS03.1task: S03.1AC-002 — Baseline artifactacceptance-criterion: AC-002 — Baseline artifactE03epic: E03FR-002 — Baselinerequirement: FR-002 — BaselineT-003 — Reproducible fit…task: T-003 — Reproducible fitted baseline and reportU02 — BANKING77 data con…capability: U02 — BANKING77 data contract
Hover an edge for its provenance · click a node to open it7 nodes · 17 edges