PCGRankRLS - linear conjugate gradient RankRLS with pairwise preferences

class rlscore.learner.cg_rankrls.PCGRankRLS(X, train_preferences, regparam=1.0, **kwargs)

Bases: rlscore.predictor.predictor.PredictorInterface

Conjugate gradient RankRLS with pairwise preferences.

Trains linear RankRLS using the conjugate gradient training algorithm. Suitable for large high-dimensional but sparse data.

Parameters:
X : {array-like, sparse matrix}, shape = [n_samples, n_features]

Data matrix

regparam : float (regparam > 0)

regularization parameter

train_preferences : {array-like}, shape = [n_preferences, 2], optional

Pairwise preference indices (alternative to: ‘Y’) The array contains pairwise preferences one pair per row, i.e. the data point corresponding to the first index is preferred over the data point corresponding to the second index.

References

RankRLS algorithm is described in [1], using the conjugate gradient optimization together with early stopping was considered in detail in [2].

[1] Tapio Pahikkala, Evgeni Tsivtsivadze, Antti Airola, Jouni Jarvinen, and Jorma Boberg. An efficient algorithm for learning to rank from preference graphs. Machine Learning, 75(1):129-165, 2009.

[2] Antti Airola, Tapio Pahikkala, and Tapio Salakoski. Large Scale Training Methods for Linear RankRLS ECML/PKDD-10 Workshop on Preference Learning, 2010.

predict(X)

Predicts outputs for new inputs

Parameters:
X : {array-like, sparse matrix}, shape = [n_samples, n_features]

input data matrix

Returns:
P : array, shape = [n_samples, n_tasks]

predictions