Skip to content

Ranker

Base class for ranking models.

Parameters

  • seed

    Typeint | None

    DefaultNone

    Random number generation seed. Set this for reproducibility.

Attributes

  • is_contextual

Methods

learn_one

Fits a user-item pair and a real-valued target y.

Parameters

  • userID
  • itemID
  • yReward
  • xdict | None — defaults to None

predict_one

Predicts the target value of a set of features x.

Parameters

  • userID
  • itemID
  • xdict | None — defaults to None

Returns

Reward: The predicted preference from the user for the item.

rank

Rank models by decreasing order of preference for a given user.

Parameters

  • userID
  • itemsset[ID]
  • xdict | None — defaults to None