sklr.base.LabelRankerMixin

class sklr.base.LabelRankerMixin[source]

Mixin class for all label rankers in scikit-lr.

Methods

score(X, Y[, sample_weight])

Return the mean Kendall rank correlation coefficient \(\tau\) on the given test data and rankings.

score(X, Y, sample_weight=None)[source]

Return the mean Kendall rank correlation coefficient \(\tau\) on the given test data and rankings.

Parameters
  • X (array-like of shape (n_samples, n_features)) – The test samples.

  • Y (array-like of shape (n_samples, n_classes)) – The true rankings for X.

  • sample_weight (array-like of shape (n_samples,), default=None) – The sample weights. If None, then samples are equally weighted.

Returns

score – The mean Kendall rank correlation coefficient \(\tau\) of self.predict(X) with respect to Y.

Return type

float