pub fn score(
interest_vector: InterestVector,
content_categories: Vec<Interest>,
) -> f64
Expand description
Calculate score for a piece of categorized content based on a user interest vector.
This scoring function is of the following properties:
- The score ranges from 0.0 to 1.0
- The score is monotonically increasing for the accumulated interest count
§Params:
interest_vector
: a user interest vector that can be fetched viaRelevancyStore::user_interest_vector()
.content_categories
: a list of categories (interests) of the give content.
§Return:
- A score ranges in [0, 1].