lightning.ranking.PRank

class lightning.ranking.PRank(n_iter=10, shuffle=True, random_state=None)[source]

Online algorithm for learning an ordinal regression model.

Parameters:

n_iter : int

Number of iterations to run.

shuffle : boolean

Whether to shuffle data.

random_state : RandomState or int

The seed of the pseudo random number generator to use.

Attributes:

coef_ : array, shape=[n_features]

Estimated weights.

thresholds_ : array, shape=[n_classes]

Estimated thresholds.

Methods

fit(X, y) Fit model according to X and y.
get_params([deep]) Get parameters for this estimator.
n_nonzero([percentage])
predict(X)
score(X, y)
set_params(**params) Set the parameters of this estimator.
__init__(n_iter=10, shuffle=True, random_state=None)[source]
fit(X, y)[source]

Fit model according to X and y.

Parameters:

X : array-like, shape = [n_samples, n_features]

Training vectors, where n_samples is the number of samples and n_features is the number of features.

y : array-like, shape = [n_samples]

Target values.

Returns:

self : classifier

Returns self.

get_params(deep=True)

Get parameters for this estimator.

Parameters:

deep: boolean, optional :

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:

params : mapping of string to any

Parameter names mapped to their values.

set_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Returns:self :