CGRankRLS - linear conjugate gradient RankRLS

class rlscore.learner.cg_rankrls.CGRankRLS(X, Y, regparam=1.0, qids=None, callbackfun=None, **kwargs)

Bases: rlscore.predictor.predictor.PredictorInterface

Conjugate gradient RankRLS.

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

Y : {array-like}, shape = [n_samples] or [n_samples, 1], optional

Training set labels (alternative to: ‘train_preferences’)

qids : list of n_queries index lists, optional

Training set qids, (can be supplied with ‘Y’)

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