Trait sbr::OnlineRankingModel[][src]

pub trait OnlineRankingModel {
    type UserRepresentation: Debug;
    fn user_representation(
        &self,
        item_ids: &[ItemId]
    ) -> Result<Self::UserRepresentation, PredictionError>;
fn predict(
        &self,
        user: &Self::UserRepresentation,
        item_ids: &[ItemId]
    ) -> Result<Vec<f32>, PredictionError>; }

Trait describing models that can compute predictions given a user's sequences of past interactions.

Associated Types

The representation the model computes from past interactions.

Required Methods

Compute a user representation from past interactions.

Given a user representation, rank item_ids according to how likely the user is to interact with them in the future.

Implementors