Metadata-Version: 2.1
Name: dqc-toolkit
Version: 0.1.2
Summary: Data Quality Check for Machine Learning
Author-email: Sumanth S Prabhu <sumanthprabhu.104@gmail.com>
License: MIT License
        
        Copyright (c) 2024 sumanthprabhu
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/sumanthprabhu/DQC-Toolkit
Project-URL: Source, https://github.com/sumanthprabhu/DQC-Toolkit
Project-URL: Tracker, https://github.com/sumanthprabhu/DQC-Toolkit/issues
Keywords: nlp,data curation,machine learning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: transformers>=4.39
Requires-Dist: sentence_transformers>=2.6.1
Requires-Dist: datasets>=2.18
Requires-Dist: scikit-learn>=1.3.2
Requires-Dist: ruff>=0.3.4
Provides-Extra: docs
Requires-Dist: mkdocs==1.5.3; extra == "docs"
Requires-Dist: mkdocs-material==9.5.17; extra == "docs"
Requires-Dist: mkdocstrings[python]==1.9.2; extra == "docs"
Requires-Dist: mkdocstrings-crystal==0.3.7; extra == "docs"
Requires-Dist: mike==2.0.0; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest>=8.1.1; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=8.1.1; extra == "dev"
Requires-Dist: mkdocs==1.5.3; extra == "dev"
Requires-Dist: mkdocs-material==9.5.17; extra == "dev"
Requires-Dist: mkdocstrings[python]==0.24.3; extra == "dev"
Requires-Dist: mkdocstrings-crystal==0.3.7; extra == "dev"

<a href="https://github.com/sumanthprabhu/DQC-Toolkit/actions" alt="Build Status"><img src='https://img.shields.io/github/actions/workflow/status/sumanthprabhu/DQC-Toolkit/test.yml' alt="Build status"/></a> 
<a href="https://sumanthprabhu.github.io/DQC-Toolkit/latest/" alt="Docs Status"><img src='https://img.shields.io/website?url=https%3A%2F%2Fsumanthprabhu.github.io%2FDQC-Toolkit%2F&label=docs' alt="Docs status"/></a>
<a href='https://pypi.org/project/dqc-toolkit/'><img src='https://img.shields.io/pypi/pyversions/DQC-Toolkit' alt="Python version"/></a>
<a href='https://pypi.org/project/dqc-toolkit/'><img src='https://img.shields.io/pypi/v/DQC-Toolkit' alt='Pypi version' /></a> 
<a href='https://github.com/sumanthprabhu/DQC-Toolkit/blob/main/LICENSE'><img src='https://img.shields.io/pypi/l/DQC-toolkit' alt='Licence' /></a>

![](/docs/images/dqc-toolkit.svg)


DQC Toolkit is a Python library and framework designed with the goal to facilitate improvement of Machine Learning models by identifying and mitigating label errors in training dataset. Currently, DQC toolkit offers `CrossValCurate` for curation of text classification datasets (binary / multi-class) using cross validation based selection.

## Installation

Installation of DQC-toolkit can be done as shown below
```python
pip install dqc-toolkit
```

## Quick Start

 Assuming your text classification data is stored as a pandas dataframe `data`, with each sample represented by the `text` column and its corresponding noisy label represented by the `label` column,  here is how you use `CrossValCurate` - 


```python linenums="1"

from dqc import CrossValCurate

cvc = CrossValCurate()
data_curated = cvc.fit_transform(data[['text', 'label']])
```
The result stored in `data_curated` which is a pandas dataframe similar to `data` with the following columns -
```python
>>> data_curated.columns
['text', 'label', 'label_correctness_score', 'is_label_correct', 'predicted_label', 'prediction_probability']
```

* `'label_correctness_score'` represents a normalized score quantifying the correctness of `'label'`. 
* `'is_label_correct'` is a boolean flag indicating whether the given `'label'` is correct (`True`) or incorrect (`False`). 
* `'predicted_label'` and `'prediction_probability'` represent the curation model's prediction and the corresponding probability score. 
 
For more details regarding different hyperparameters available in `CrossValCurate`, please refer to the [API documentation](https://sumanthprabhu.github.io/DQC-Toolkit/).
