These tools and metrics are designed to help AI actors develop and use trustworthy AI systems and applications that respect human rights and are fair, transparent, explainable, robust, secure and safe.
MetricLib
MetricLib is an open-source Python toolkit for evaluating the quality of datasets used in medical machine learning. It was developed by the Physikalisch-Technische Bundesanstalt (PTB), Germany's national metrology institute. The toolkit puts into practice the METRIC-framework for trustworthy AI in medicine, which defines the dimensions of data quality that matter for medical AI. MetricLib is the software companion to Metric Hub, PTB's online library of data quality metrics. It helps developers check whether training and test data are fit for purpose and identify data quality gaps.
The toolkit organises its metrics into five modules that follow the clusters of the METRIC-framework: measurement process, timeliness, representativeness, informativeness and consistency. It currently implements 19 metrics. These include completeness, sample entropy, duplicates, Wasserstein distance, maximum mean discrepancy, generalised imbalance ratio and demographic parity. It also includes segmentation metrics such as the Dice similarity coefficient and Hausdorff distance. MetricLib processes a range of data modalities in a memory-efficient way.
Users load a dataset, select the metrics relevant to their use case, and generate a data quality report. Aggregated scores make it easier to identify where data quality falls short. Users can add custom metrics to address use-case-specific requirements. Example notebooks show the workflow on the PTB-XL electrocardiogram dataset and on a medical image segmentation use case. The code is available on GitHub under the GPL-2.0 licence.
About the tool
You can click on the links to see the associated tools
Developing organisation(s):
Tool type(s):
Objective(s):
Purpose(s):
Target sector(s):
Country/Territory of origin:
Lifecycle stage(s):
Type of approach:
Maturity:
Usage rights:
License:
Target users:
Stakeholder group:
Required skills:
Risk management stage(s):
Technology platforms:
Programming languages:
Github stars:
- 3
Github forks:
- 1
Use Cases
Would you like to submit a use case for this tool?
If you have used this tool, we would love to know more about your experience.
Add use case




























