Version 0.3#
Legend for changelogs
Major Feature something big that you could not do before.
Feature something that you could not do before.
Efficiency an existing feature now may not require as much computation or memory.
Enhancement a miscellaneous minor improvement.
Fix something that previously did not work as documented, or according to reasonable expectations, should now work.
API Change you will need to change your code to have the same effect in the future, or a feature will be removed in the future.
Version 0.3.0#
October 2026
scikit-lr requires Python 3.13 or later, and is built with meson-python. By Juan Carlos Alfaro Jiménez. #99
The public API has type hints, which type checkers find in the installed package (PEP 561). By Juan Carlos Alfaro Jiménez. #99
There are wheels for Linux (x86_64 and aarch64), macOS (x86_64 and arm64) and Windows (AMD64 and ARM64). By Juan Carlos Alfaro Jiménez. #99
The extension modules extend the internals of scikit-learn, so scikit-lr is built against a single minor release of scikit-learn, 1.9, and importing
sklrwith another one raises anImportError. By Juan Carlos Alfaro Jiménez. #99Every ranker works with the tools of scikit-learn that take an estimator, such as
Pipeline,GridSearchCVandcross_validate(), and accepts pandas data frames. The trees and the dummy rankers take sample weights infitand every ranker takes them inscore, which metadata routing passes through pipelines and model selection tools, as described in Using the rankers with scikit-learn. By Juan Carlos Alfaro Jiménez. #99
sklr#
Feature
show_versions()prints the versions of scikit-lr, of the scikit-learn that it was built against and of the dependencies, to include them in bug reports. By Juan Carlos Alfaro Jiménez. #99
sklr.base#
Feature
base.LabelRankerMixinandbase.PartialLabelRankerMixinset the tags of the label rankers and of the partial label rankers, and theirscoremethod computesmetrics.kendall_tau_score()andmetrics.tau_x_score()on the predictions of the ranker.base.is_label_ranker()andbase.is_partial_label_ranker()tell them apart from other estimators. By Juan Carlos Alfaro Jiménez. #99
sklr.dummy#
Major Feature
dummy.DummyLabelRankeranddummy.DummyPartialLabelRankerpredict, for every sample, the consensus of the possibly incomplete training rankings or a given ranking, as baselines to compare with other rankers. By Juan Carlos Alfaro Jiménez. #99
sklr.metrics#
Feature
metrics.kendall_tau_score()andmetrics.kendall_distance()compare label rankings, andmetrics.tau_x_score()compares partial label rankings, averaging over the samples with optional sample weights.metrics.get_scorer()gets their scorers by name, to pass them to thescoringparameter of the model selection tools of scikit-learn, andmetrics.get_scorer_names()lists the names. By Juan Carlos Alfaro Jiménez. #99
sklr.neighbors#
Major Feature
neighbors.KNeighborsLabelRankerpredicts the ranking of each sample from the possibly incomplete rankings of its nearest neighbors, with the Mallows or the Plackett-Luce model, and weights the neighbors equally, by the inverse of their distance or by the rule of Dudani. By Juan Carlos Alfaro Jiménez. #99Major Feature
neighbors.KNeighborsPartialLabelRankerpredicts the bucket order of each sample from the possibly incomplete partial rankings of its nearest neighbors, with the Bucket Pivot Algorithm, and weights the neighbors equally, by the inverse of their distance or by the rule of Dudani. By Juan Carlos Alfaro Jiménez. #99Efficiency
neighbors.KNeighborsLabelRankerandneighbors.KNeighborsPartialLabelRankerestimate the rankings of the queries in parallel, with the number of threads set byn_jobs, which also sets those of the neighbor search. By Juan Carlos Alfaro Jiménez. #99
sklr.tree#
Major Feature
tree.DecisionTreeLabelRankergrows a decision tree that fits the Mallows model to the possibly incomplete rankings of each node and predicts the center ranking of each leaf, with the parameters, the sample weights, the missing values in the features, the pruning and the export withsklearn.tree.export_graphviz()of the trees of scikit-learn. By Juan Carlos Alfaro Jiménez. #99Major Feature
tree.DecisionTreePartialLabelRankergrows a decision tree from possibly incomplete partial rankings, with the disagreements, distance, entropy and Gini impurities of the pairs of labels, and predicts the bucket order of each leaf with the Bucket Pivot Algorithm, with the parameters, the sample weights, the missing values in the features, the pruning and the export withsklearn.tree.export_graphviz()of the trees of scikit-learn. By Juan Carlos Alfaro Jiménez. #99
sklr.utils#
Feature
utils.check_ranking()validates the rankings of a target and converts them to afloat64array, rejecting rankings with ties and incomplete rankings unless they are allowed. By Juan Carlos Alfaro Jiménez. #99Feature
utils.type_of_ranking()determines whether a target holds label rankings, partial label rankings or does not encode rankings, following the representation described in Ranking representation. By Juan Carlos Alfaro Jiménez. #99