API reference#

This is the class and function reference of scikit-lr. Each entry links to a page with its full description, and the user guide gives more details on how to use them.

sklr: Settings and information tools#

show_versions()

Print useful debugging information.

sklr.base: Base classes and utility functions#

LabelRankerMixin()

Mixin class for all label rankers in scikit-lr.

PartialLabelRankerMixin()

Mixin class for all partial label rankers in scikit-lr.

is_label_ranker(estimator)

Return True if the given estimator is (probably) a label ranker.

is_partial_label_ranker(estimator)

Return True if the given estimator is (probably) a partial label ranker.

sklr.metrics: Metrics#

See the Metrics and scoring: evaluating the rankers section of the user guide for further details.

Scoring interface#

get_scorer(scoring)

Get a scorer of label ranking or partial label ranking from its name.

get_scorer_names()

Get the names of all the scorers of label ranking and partial label ranking.

Label ranking metrics#

kendall_distance(y_true, y_pred, *[, ...])

Compute the Kendall distance between label rankings.

kendall_tau_score(y_true, y_pred, *[, ...])

Compute Kendall's \(\tau\) between label rankings.

Partial label ranking metrics#

tau_x_score(y_true, y_pred, *[, sample_weight])

Compute the \(\tau_x\) coefficient between partial label rankings.

sklr.utils: Utilities#

check_ranking(y, *[, allow_ties, ...])

Input validation on the rankings of a target.

type_of_ranking(y)

Determine the type of rankings indicated by the target.