MLQA 
A package to perform QA for Machine Learning Models.
Introduction
MLQA is a Python package that is created to help data scientists, analysts and developers to perform quality assurance (i.e. QA) on pandas dataframes and 1d arrays, especially for machine learning modeling data flows. It's designed to work with logging library to log and notify QA steps in a descriptive way.
Installation
You can install MLQA with pip.
pip install mlqa
MLQA depends on Pandas and Numpy and works in Python 3.5+.
Quickstart
You can easily initiate the object and fit a pd.DataFrame.
>>> from mlqa.identifiers import DiffChecker
>>> import pandas as pd
>>> dc = DiffChecker()
>>> dc.fit(pd.DataFrame({'mean_col':[1, 2]*50, 'na_col':[None]*50+[1]*50}))
Then, you can check on new data if it's okay for given criteria. Below, you can see data with increased NA count in column na_col. The default threshold is 0.5 which means it should be okay if NA rate is 50% more than the fitted data. NA rate is 50% in the fitted data so up to 75% (i.e. 50*(1+0.5)) should be okay. NA rate is 70% in the new data and, as expected, the QA passes.
>>> dc.check(pd.DataFrame({'mean_col':[1, 2]*50, 'na_col':[None]*70+[1]*30}))
True
See more examples at Documentation/Quickstart. You can also read the full documentation here.
Tests
Tests are written with unittest and can be located in the tests folder. There are also some tests in docstring to be run by doctest.
License
Metadata
Release files for mlqa 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mlqa-0.1.0.tar.gz | 16.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mlqa-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.2 kB
Release files / mlqa-0.1.0.tar.gz
| Download URL | mlqa-0.1.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb140c427d279534a5935c5e4c0307ffebdcc11224ec16992fd95821207d1531
|
|
BLAKE2b-256 checksum How to use checksums |
109545f04a228c9147c38af7eb421a9463aa841d0c359a731e1d11da71fb1d5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Release files / mlqa-0.1.0-py3-none-any.whl
| Download URL | mlqa-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e603969a535ab4bf2be5a8ff37604672655c833ea392f593579eeb6adc76eb0
|
|
BLAKE2b-256 checksum How to use checksums |
fdb670e6646492a898b5b507aef5f7495c3bf0911841f957cbf40cc0e91c429f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
|
Security for mlqa 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.