A module for evaluating the predictions of the models trained on MEDS datasets.
Project description
MEDS Evaluation
This package provides an evaluation API for models produced in the MEDS ecosystem. If predictions are produced
in accordance with the provided pyarrow schema, this package can be used to evaluate a model's performance
in a consistent, Health-AI focused manner.
To use, simply:
- Install:
pip install meds-evaluation - Produce predictions that satisfy the included schema.
- Run the
meds-evaluation-clitool:meds-evaluation-cli predictions_path="$PREDICTIONS_FP_GLOB" output_dir="$OUTPUT_DIR"
A JSON file with the output evaluations will be produced in the given dir!
[!NOTE] This is a work-in-progress package and currently only supports evaluation of binary classification tasks.
Prediction schema
Inputs to MEDS Evaluation must follow the prediction schema, which by default has five fields:
subject_id: ID of the subject (patient) associated with the eventprediction_time: time at which the prediction as being madeboolean_value: ground truth boolean label for the prediction taskpredicted_boolean_value(optional): predicted boolean label generated by the modelpredicted_boolean_probability(optional): predicted probability logits generated by the model
This is equivalent to the following polars schema:
Schema(
[
("subject_id", Int64),
("prediction_time", Datetime(time_unit="us")),
("boolean_value", Boolean),
("predicted_boolean_value", Boolean),
("predicted_boolean_probability", Float64),
]
)
Note that while predicted_boolean_value and predicted_boolean_probability are optional, at least one of
them must be present and contain non-null values in order to generate the results. In addition, a schema can
contain additional fields but at the moment these will not be used in MEDS Evaluation.
MEDS Ecosystem
MEDS Evaluation pipeline is intended to be used together with MEDS-DEV, but can also be adapted to use as a standalone package.
Please refer to the MEDS-DEV tutorial to learn how to extract and prepare the data in the MEDS format and obtain model predictions ready to be evaluated.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meds_evaluation-0.0.4.tar.gz.
File metadata
- Download URL: meds_evaluation-0.0.4.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5f33a70241a85d43527b11c4017c43e5971b6681a50a925fa456172ea83d066
|
|
| MD5 |
c9c3269ed619585134842b555a0d1ba5
|
|
| BLAKE2b-256 |
2419a7ca0f9da66f8b26874f1162e21130f23426aededcc4e88a3b34aa1c0233
|
Provenance
The following attestation bundles were made for meds_evaluation-0.0.4.tar.gz:
Publisher:
publish-to-pypi.yaml on kamilest/meds-evaluation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meds_evaluation-0.0.4.tar.gz -
Subject digest:
e5f33a70241a85d43527b11c4017c43e5971b6681a50a925fa456172ea83d066 - Sigstore transparency entry: 212360724
- Sigstore integration time:
-
Permalink:
kamilest/meds-evaluation@41eebd17f5c41c7b45f4803f36d71a94678c14e6 -
Branch / Tag:
refs/tags/0.0.4 - Owner: https://github.com/kamilest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@41eebd17f5c41c7b45f4803f36d71a94678c14e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file meds_evaluation-0.0.4-py3-none-any.whl.
File metadata
- Download URL: meds_evaluation-0.0.4-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a8a7cd4ce127579792f3c2fe75e56b184487b8745320a0e31577927a783c6c1
|
|
| MD5 |
1374292292d4ba872f759d034e929747
|
|
| BLAKE2b-256 |
052df7946f5b0af9276ba7043baade4ece08125516be3137ce6b62203091bb46
|
Provenance
The following attestation bundles were made for meds_evaluation-0.0.4-py3-none-any.whl:
Publisher:
publish-to-pypi.yaml on kamilest/meds-evaluation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
meds_evaluation-0.0.4-py3-none-any.whl -
Subject digest:
1a8a7cd4ce127579792f3c2fe75e56b184487b8745320a0e31577927a783c6c1 - Sigstore transparency entry: 212360729
- Sigstore integration time:
-
Permalink:
kamilest/meds-evaluation@41eebd17f5c41c7b45f4803f36d71a94678c14e6 -
Branch / Tag:
refs/tags/0.0.4 - Owner: https://github.com/kamilest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yaml@41eebd17f5c41c7b45f4803f36d71a94678c14e6 -
Trigger Event:
push
-
Statement type: