Metadata-Version: 2.4
Name: intrinsic-kappa
Version: 0.1.2
Summary: Prevalence-independent intrinsic kappa coefficient for classification systems with any number of categories.
Author: Rafael Sanchez-Marquez
License: MIT
Project-URL: Homepage, https://github.com/your-username/intrinsic-kappa
Project-URL: Repository, https://github.com/your-username/intrinsic-kappa
Project-URL: Documentation, https://github.com/your-username/intrinsic-kappa#readme
Keywords: kappa,intrinsic kappa,classification,machine learning,confusion matrix,performance metrics,statistics,quality inspection
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.21
Requires-Dist: scipy>=1.7
Requires-Dist: pandas>=1.3
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"

# intrinsic-kappa

A Python library for computing the **prevalence-independent intrinsic kappa coefficient** and its one-sided confidence lower bounds for classification systems with any number of categories (NC ≥ 2).

## Background

Traditional Cohen's kappa depends on class prevalence — the proportion of instances in each category — which can produce misleading performance estimates when a dataset is imbalanced. The **intrinsic kappa** solves this by anchoring the chance-agreement term exclusively to the number of categories (1/NC), providing a robust and stable measure of a classifier's inherent discriminatory ability, regardless of sample composition.

This package is based on the methodology published in:

> Sanchez-Marquez, R., & Jabaloyes Vivas, J. (2026). *A statistical approach to the confusion matrix for classification problems using machine learning*. Neurocomputing, 133962. ISSN 0925-2312. https://doi.org/10.1016/j.neucom.2026.133962

## Installation

```bash
pip install intrinsic-kappa
