Examples#

Worked examples for skordinal. Every script runs during the documentation build, so the output and figures on each page come from the code above them. Start with the quickstart, then browse by topic.

Getting started#

The end-to-end workflow: load a dataset, tune an ordinal classifier inside a scikit-learn pipeline and evaluate it with ordinal metrics.

Quickstart: an ordinal classifier in a scikit-learn pipeline

Quickstart: an ordinal classifier in a scikit-learn pipeline

Classifiers#

How the ordinal classifiers differ, what their decision regions and probabilities look like, and how to build one out of a scikit-learn estimator.

Comparing ordinal classifiers

Comparing ordinal classifiers

Visualising cumulative probabilities

Visualising cumulative probabilities

Decision regions of ordinal classifiers

Decision regions of ordinal classifiers

Building an ordinal classifier from a scikit-learn estimator

Building an ordinal classifier from a scikit-learn estimator

Metrics#

Why accuracy misses the point on ordered classes, and what MAE, weighted kappa and their per-class variants measure instead.

Ordinal metrics penalise distant errors

Ordinal metrics penalise distant errors

Ordinal-aware versus nominal classification

Ordinal-aware versus nominal classification

Per-class metrics for imbalanced targets

Per-class metrics for imbalanced targets

Experiments#

Running many models over many datasets and resamples, and reading the results back.

Benchmarking classifiers across datasets

Benchmarking classifiers across datasets

Gallery generated by Sphinx-Gallery