Repository navigation
Releases
Releases · Krv-Labs/pasteur
v0.4.1
0.4.1
Fixed
JitterSimulator.transformbeforefitnow raises instead of returning the
data unchanged, which would have scored as perfect jitter stability. This
affects the RustJitterSimulatorandpypasteur.JitterSimulator.- The
pasteur-modelREADME example passesSome(1)for the positive class
index, matching the 0.4.0Option<usize>signature. - Positive-class-index errors from
OnnxModel::from_filename the parameter
as well as the CLI flag.
Added
pasteur-cli --version.pypasteur.__version__.
What's Changed
- Fix post-0.4.0 release issues by @jeremy-wayland in #6
- Prepare v0.4.1 release by @jeremy-wayland in #7
Full Changelog: v0.4.0...v0.4.1
v0.4.0
0.4.0
Added
- Multiclass and multilabel models.
metadata.jsongainstask_type
(binary|multiclass|multilabel) andoutput.{name, classes, thresholds}.simulate,evaluate, andcomparetake--task, and
--positive-group-idis repeatable (one cohort per model output, in
output.classesorder). All sklearn-onnx probability formats are read:
[n, K]tensors, ZipMaps with int or string keys (matched toclassesby
name), andMultiOutputClassifier's per-label tensor sequence. - Every metric is computed per class/label; headline fields are macro
averages. A newmultisection in the result JSON reports micro ROC AUC,
worst-label resiliency, a jitter decision-flip rate, the share of flipper
pairs that never flip, the multiclass detour rate, labels excluded for
having one class, and per-label scores. Binary output has nomultikey. - Multiclass jitter stability sums the per-class prediction variances and
halves them, so it equals the binary score for 2 classes and does not
depend on how many classes the model has. Multilabel averages per label. - Multiclass flipper finds where the pairwise margin
p[b] − p[a]crosses 0;
multilabel flipper samples pairs per label (newpair_labelgrid column)
and crosses each label's own threshold. - Single-target regression models.
task_type: "regression"in
metadata.json(default outputvariable, thenpredictions), and
--task regressionwith true values from--targets <parquet> --target-col <name>, joined by ID as text.baselinesarermse,mae
andr2; resiliency is blackout R² ÷ clean R² (the share of skill kept)
undermetric_based.r2; jitter variance is scaled by the target's variance.
Flipper pairs patients across a clinical cutoff (--flip-threshold, in
target units, passed to bothsimulateandevaluate) and finds where the
prediction crosses it. A newregressionsection reports these in target
units; classifier JSON is unchanged.
Changed
- Breaking (library):
Model::predict_probareturns aDataFramewith
one column per output,SimulationVariant.yis aDataFramelabel matrix,
EvaluationConfiggainstask, andOnnxModel::from_filetakes
positive_class_index: Option<usize>.TaskTypegainsRegressionand
EvaluationResultgains an optionalregressionfield. CLI usage for
binary models is unchanged. evaluate/compare--labelsis no longer required at parse time; it is
required for classifiers and refused for regression.--flip-threshold
still defaults to 0.5 for classifiers.- ROC AUC handles tied scores. Ties count half (Mann–Whitney) instead of
depending on row order. Results without ties agree with the previous
implementation to floating-point rounding. - The probability output is resolved when the model loads. A model without
output_probability/probabilities(or the contract'soutput.name) now
fails at load with the list of its real outputs, instead of at first
prediction. comparerefuses two--modelfiles with the same file name instead of
panicking on duplicate prediction columns.
Docs
- New pages for hospital IT and model reviewers: security and data handling
(data flow, network behaviour, offline install, PHI in outputs), metric
definitions and caveats, and an end-to-end model-selection walkthrough. - One-page usage overview PDF for IT review.
- Fixed broken schema links and removed internal references from the READMEs
and--helptext.
What's Changed
- Docs: security, metrics, and model-selection guides for hospital IT by @jeremy-wayland in #1
- Multiclass and multilabel model evaluation by @jeremy-wayland in #2
- Single-target regression model evaluation by @jeremy-wayland in #3
- Simplify agent docs and bring them up to date with #2 and #3 by @jeremy-wayland in #4
- Prepare v0.4.0 release by @jeremy-wayland in #5
New Contributors
- @jeremy-wayland made their first contribution in #1
Full Changelog: v0.3.0...v0.4.0
v0.3.0
0.3.0
First open-source release. Versions 0.1 and 0.2 were internal and are not in
this repository's history.
Added
pasteur-core,pasteur-cli,pasteur-hf, andpasteur-model.pypasteur(import pypasteur). Wheels are abi3 for CPython ≥ 3.12:
Linux x86_64/aarch64, macOS x86_64/arm64, and Windows x64, plus an sdist.- A release publishes those artifacts to PyPI, the four crates to crates.io,
and the GitHub Release.
Behavior
- Blackout masks companion columns.
BlackoutConfig.companionsis
required.apply_masknulls the feature and its companions together, and
errors if a companion is not in the frame. A blacked-out assay that kept
{assay}_measured == 1is not a row an EHR emits, so flip rates would
measure extrapolation rather than robustness.
pasteur-cli simulate --blackout-companion <COL>is repeatable. - Null fill defaults to NaN.
OnnxModel::from_filetakesnull_fill,
andevaluate/comparetake--null-fill. Resolution order: flag →
the model'smetadata.jsoninput.absent_sentinel→ NaN.0.0TSH is
not absence, it is profoundly suppressed. Models that are not NaN-native
error instead of returning NaN probabilities that poison ROC AUC.
A model trained with0.0as the missing-value token should declare
"absent_sentinel": 0.0underinputinmetadata.json, or pass
--null-fill 0. - Feature order is validated against the loaded model.
from_file
resolves the input name against the session's actual inputs, checks the
input width, and — when ametadata.jsonsits beside the.onnx—
comparesinput.feature_orderelement-wise. Wrong width already errored
inside ONNX Runtime; wrong order at the right width did not.
Changed
- Licensed under BSD-3-Clause. Crates carry crates.io metadata and inherit
version, license, and MSRV from the workspace. - Builds on stable Rust ≥ 1.95. 1.95 is the floor polars 0.54 actually
needs (polars-oocuses APIs stabilized in 1.95), even though no
dependency declares it.
Full Changelog: https://github.com/Krv-Labs/pasteur/commits/v0.3.0