skordinal is a scikit-learn compatible library for ordinal classification, the supervised task whose class labels have a natural order but no known distance between them, such as a rating from poor to excellent or a disease graded from I to IV. A nominal classifier ignores that order, so confusing poor with excellent costs it exactly as much as confusing poor with fair. The estimators here model the order instead, and the metrics score a prediction against it.
Every estimator follows the scikit-learn API, so it drops unchanged into a Pipeline, a GridSearchCV and the rest of the ecosystem. skordinal is developed by the AYRNA research group at the University of Córdoba and continues the work of ORCA and ORCA-python.
pip install skordinalBinary wheels are published for Linux x86-64. On every other platform pip builds the three C extensions (REDSVM, SVOR, ORBoost) from source, which requires a C/C++ compiler. Progress bars during a benchmark run need one optional extra, pip install "skordinal[progress]".
- Classifiers: ten ordinal methods, from threshold models (
POM,LogisticAT,LogisticIT) and neural networks (NNPOM,NNOP,ELMOP) to a kernel discriminant (KDLOR), support vector machines (SVOR,REDSVM) and boosting (ORBoost), plus three meta-estimators (OrdinalDecomposition,RegressorWrapper,CostSensitiveWrapper) that build an ordinal classifier out of any scikit-learn one. - Metrics: thirteen ways to judge an ordinal prediction, including distance to the true class (MAE, AMAE, MMAE), exact and off-by-one accuracy, per-class sensitivity, weighted kappa, rank correlation and the ranked probability score. All but the last are available as scikit-learn scorers through
get_ordinal_scorer. - Datasets and experiments: five bundled ordinal benchmark datasets, a loader for your own CSV files with reproducible resamples, and a
Benchmarkthat fits every combination of model, dataset and resample and writes the aggregated results to disk.
The documentation is the place to start. The getting started guide installs the library and fits a first model, the gallery of examples works through the classifiers, the metrics and the benchmarking harness, and the API reference documents every class and function.
Bug reports and pull requests are welcome on the issue tracker. Please open an issue before starting a large change so the work can be aligned with the project. For a development install:
git clone https://github.com/ayrna/skordinal.git
cd skordinal
pip install -e ".[dev,docs]"
pre-commit install
pytestIf you use skordinal in your research, please cite it as:
@misc{skordinal2026,
title = {{skordinal: A scikit-learn compatible Python package for ordinal classification}},
author = {Sevilla Molina, {\'A}ngel and Guijo-Rubio, David and Vargas, V{\'i}ctor Manuel and Guti{\'e}rrez, Pedro A.},
year = {2026},
url = {https://github.com/ayrna/skordinal}
}skordinal is distributed under the BSD 3-Clause License.