CGRLS - linear conjugate gradient RLS

class rlscore.learner.cg_rls.CGRLS(X, Y, regparam=1.0, bias=1.0, callbackfun=None, **kwargs)

Bases: rlscore.predictor.predictor.PredictorInterface

Conjugate gradient RLS.

Trains linear RLS 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]

Training set labels

bias : float, optional

value of constant feature added to each data point (default 0)

References

For an overview of regularized least-squares, and the conjugate gradient based optimization scheme see [1].

[1] Ryan Rifkin Everything old is new again : a fresh look at historical approaches in machine learning PhD Thesis, Massachusetts Institute of Technology, 2002

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