Metadata-Version: 2.4
Name: NCD_KNN_Classifier
Version: 0.1.0
Summary: A kNN classifier based on NCD distance metric for text compression
Author-email: Javier Montaño <franjamonga@icloud.com>
Project-URL: Homepage, https://github.com/M-CORE-hub/NCDClassifier
Project-URL: Bug Tracker, https://github.com/M-CORE-hub/NCDClassifier/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy==2.2.4
Requires-Dist: scikit-learn==1.6.1
Requires-Dist: tqdm==4.67.1
Requires-Dist: datasets==3.4.1
Dynamic: license-file

# NCDClassifier

A kNN classifier based on the Normalized Compression Distance (NCD) for text classification.

## Installation

Install the package using pip:

```bash
pip install NCD_KNN_Classifier
```

## Usage

Here's a basic example of how to use the classifier:

```python
from NCD_KNN_Classifier import CompNCDClassifier

# Assuming you have train and test datasets prepared
classifier = CompNCDClassifier(
    train_dataset=dataset['train'],
    test_dataset=dataset['test'],
    k=3,
    compressor="gzip",
    verbose=True
)
classifier.save_to_pickle("train_footprints.pkl")
metrics = classifier.evaluate()
print("Evaluation metrics:", metrics)
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
