This release is a pre-release and may not be stable for production use.
skordinal
| Overview | |
|---|---|
| CI/CD | |
| Code |
What is skordinal?
skordinal is an experimental framework built on Python that integrates with scikit-learn to automate machine learning experiments through simple JSON configuration files. Initially designed for ordinal classification, it supports regular classification algorithms as long as they are compatible with scikit-learn, making it easy to run reproducible experiments across multiple datasets and classification methods.
Table of Contents
Installation
Requirements
skordinal requires Python 3.10 or higher and is tested on Python 3.10, 3.11, 3.12, 3.13, and 3.14.
All dependencies are managed through pyproject.toml and include:
- numpy (>=1.21)
- pandas (>=1.0.1)
- scikit-learn (>=1.3.0)
- scipy (>=1.7)
Setup
-
Clone the repository:
git clone https://github.com/ayrna/skordinal cd skordinal
-
Install the framework:
pip install .
For development purposes, use editable installation:
pip install -e .
Optional dependencies for development:
pip install -e .[dev]
Testing Installation
Test your installation with the provided example:
python examples/run_recipe.py examples/recipes/full_demo.py
Quick Start
skordinal includes sample datasets with pre-partitioned train/test splits using a 30-holdout experimental design.
Basic experiment configuration:
A recipe is a Python file that defines a top-level RECIPE dict whose keys
map directly to Benchmark constructor parameters. The required keys are
models, datasets, eval_metrics, and results_path; all other keys are
optional and fall back to the Benchmark defaults.
from sklearn.svm import SVC
from skordinal.classifiers import OrdinalDecomposition
from skordinal.experiments import ModelConfig
RECIPE = {
"datasets": ["balance_scale", "era", "esl"],
"cv": 3,
"n_jobs": 1,
"input_preprocessing": "std",
"results_path": "results/",
"eval_metrics": [
"accuracy_score",
"mean_absolute_error",
"average_mean_absolute_error",
"mean_zero_one_error",
],
"tuning_metric": "neg_mean_absolute_error",
"models": {
"SVM": ModelConfig(
SVC(),
param_grid={"C": [0.001, 0.1, 1, 10, 100], "gamma": [0.1, 1, 10]},
),
"SVMOP": ModelConfig(
OrdinalDecomposition(
dtype="ordered_partitions",
decision_method="frank_hall",
base_classifier=SVC(probability=True),
),
param_grid={
"base_classifier__C": [0.01, 0.1, 1, 10],
"base_classifier__gamma": [0.01, 0.1, 1, 10],
},
),
},
}
Run the experiment:
python examples/run_recipe.py my_experiment.py
Results are saved in the results/ folder with performance metrics for each
dataset-classifier combination. The framework automatically performs
cross-validation, hyperparameter tuning, and evaluation on test sets.
Each classifier-dataset pair gets its own directory holding a report.csv
with per-resample metrics, a hyperparameter_configuration.csv recording the
best hyperparameters chosen for each seed, and a predictions_by_seed/
folder grouping the outputs of every resample:
results/
└── <classifier>/
└── <dataset>/
├── report.csv
├── hyperparameter_configuration.csv
└── predictions_by_seed/
└── seed_<N>/
├── train_predictions.csv
├── test_predictions.csv
├── train_confusion_matrix.txt
└── test_confusion_matrix.txt
Each predictions CSV lists the Pattern ID, the zero-based Target class
index, a Prediction probabilities column with the per-class probabilities
(for estimators that support predict_proba), and the zero-based
Prediction class index — the argmax of the probabilities when they are
present, or the estimator's own prediction otherwise. Confusion matrices are
written alongside as plain-text .txt files, the fitted estimator for each
seed is stored under a models/ subfolder, and aggregated
train_summary.csv and test_summary.csv files are produced across all
runs.
Configuration Files
Experiments are defined as Python recipe files — a module that exposes a
top-level RECIPE dict. Every key in RECIPE corresponds to a Benchmark
constructor parameter. Recipes can be run from the command line or loaded
programmatically via Benchmark.from_recipe("path/to/recipe.py").
settings
These keys control how the benchmark is executed.
Required:
datasets: list of dataset names. A loader or subfolder with each name must be available underdata_home.eval_metrics: list of metric names computed on train and test for every partition.results_path: folder where result files are written.
Optional:
tuning_metric(default"neg_mean_absolute_error"): scoring criterion passed toGridSearchCVto select the best hyperparameters.cv(default3): number of cross-validation folds.n_jobs(default1): parallel jobs forGridSearchCV.input_preprocessing(defaultNone):"std"for standardisation,"norm"for normalisation,Nonefor no scaling.resamples(default30): number of train/test resamples per dataset.data_home(defaultNone): base directory for dataset files;Noneuses the bundled datasets.random_state(defaultNone): integer seed for reproducibility.verbose(defaultTrue): print progress during the run.
models
Required. A dict mapping a label (str) to a ModelConfig instance.
ModelConfig binds a scikit-learn-compatible estimator to an optional
param_grid.
ModelConfig(estimator, param_grid=None): wraps any estimator that implements the scikit-learn estimator interface.param_gridis a dict of hyperparameter name → list of values forGridSearchCV. For pipeline-style estimators (e.g.OrdinalDecomposition) use the double-underscore syntax ("base_classifier__C") to target nested parameters.
Running Experiments
Basic Usage
python examples/run_recipe.py experiment_file.py
Example Output
Results are stored in the specified output folder with detailed performance metrics and hyperparameter information for each dataset and configuration combination.
License
Metadata
Release files for skordinal 0.1.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| skordinal-0.1.0rc1.tar.gz | 226.0 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| skordinal-0.1.0rc1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| skordinal-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| skordinal-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| skordinal-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| skordinal-0.1.0rc1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details |
Total release size: 12.6 MB
Release files / skordinal-0.1.0rc1.tar.gz
| Download URL | skordinal-0.1.0rc1.tar.gz |
|---|---|
| Size | 226.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68fb88aa3e14d5775fdc4fb4f8dfab0d0c966b99e1f1633af0cf16f9c49f4521
|
|
BLAKE2b-256 checksum How to use checksums |
d869950c58e47465dc7ff17c369f4f8436bc38bda16a2eb461824f3597eec9e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / skordinal-0.1.0rc1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | skordinal-0.1.0rc1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f0c3f0b274abba5e0318bc1a8b9fceffcf9a1786fe08cafe6b2683b7af1e01f0
|
|
BLAKE2b-256 checksum How to use checksums |
f7ff51c2da721b83049871facb58d611ca4beaeaec856c1bdc2038b641c293bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / skordinal-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | skordinal-0.1.0rc1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4c4e9ad4915dd032ec2a830cf3bde3eb28d821b4bf0f0116daa1fad882584d16
|
|
BLAKE2b-256 checksum How to use checksums |
b8e61e67dce92900d5ea2fc6f3239822eb6c14a8a2f8c1be8a3e4088afc30ff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / skordinal-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | skordinal-0.1.0rc1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d5b6f0c141d57f0d99d996e8d8b3d9e6295727c6e6968b361800f16ca81a4149
|
|
BLAKE2b-256 checksum How to use checksums |
2ce98babf306b772575720fb9c997a73ac18ee9251678e36cca382e7defd039e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / skordinal-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | skordinal-0.1.0rc1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b4fb4871da9c9ce83cc4e824e335847b91f53617c3ca8e453520b6f88f568d32
|
|
BLAKE2b-256 checksum How to use checksums |
3751e82c8cd3d521450b4523614206bb705127db8eb8e70a174c5e0f754bb715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / skordinal-0.1.0rc1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | skordinal-0.1.0rc1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8928e43c11a750615e142c45d250900a479327096d367afd7f4fede1973194ca
|
|
BLAKE2b-256 checksum How to use checksums |
aa0fd6d4ab5930baba02f1cf6107d2d4fb4e5fc40e1cb7b21725f70f7337737d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logSecurity for skordinal 0.1.0rc1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for skordinal-0.1.0rc1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.