bitig 0.3.0
First PyPI release of the Forensic Lab and the full internal-audit remediation. This version supersedes 0.1.1 directly; 0.2.0 was tagged internally but never published, so its Forensic Lab work lands here alongside the audit fixes.
pip install --upgrade bitig # core
pip install "bitig[cluster]" # + UMAP / HDBSCAN clustering
Highlights
- Forensic Lab. A complete case-management workflow for authorship verification: case creation, evidence intake with roles, recipe-driven runs, a chain-of-custody seal, and court-ready PDF reports.
- Two-sided likelihood-ratio verbal scale following ENFSI (2015) and Nordgaard et al. (2012). Strength is symmetric in LR and 1/LR, and direction is reported explicitly as prosecution (LR > 1), defence (LR < 1), or inconclusive. A defence-favouring LR is now surfaced as defence support rather than hidden as "no support".
Forensic methodology
- General Impostors rewritten to faithfully follow Koppel and Winter (2014) and Seidman (2013), with per-iteration impostor sampling and a configurable
impostor_n(default 1, chance baseline 0.5). - c@1 corrected so a zero abstention margin reduces exactly to accuracy (Peñas and Rodrigo, 2011).
- Delta runner now reports
resubstitution_accuracy(in-sample) with a note directing users tobitig classifyfor held-out cross-validation.
Correctness fixes
- Four stylometry methods repaired: ZetaEder add-k smoothing, MTLD segment floor, EderDelta frequency-rank weighting, and a Bayesian negative-input guard.
classifynow defaults to stratified folds and rejects grouping by the target label.
Security and integrity
- Chain-of-custody seal closed: sign-invariant case-state hash, signing always binds a frozen report, and
bitig case verifyre-checks the seal. - Path-traversal hardening and atomic writes across all case-file operations.
Packaging
umap-learnandhdbscanmoved to an optionalclusterextra to keep the core install lean.- PyPI publishing via GitHub OIDC Trusted Publishing, with PEP 740 attestations.