Runtime Item Recommendation Algorithms
At runtime the Seldon server can utilize a set of item recommendation algorithms to provide recommendations. These runtime algorithms are usually based on some offline model. The list of default algorithms and their associated models are described below.
Many of the content recommendation algorithms use two general ways to provide recommendations :
- Use the entire built model to score new items for a user
- Use the user’s recent item interactions as a basis to score new items for a user. This method is using the users recent interests as a basis for item recommendation. For example, use the last three pages a user has read on a news site as a basis to provide recommendations
As Seldon allows combining algorithms both can be used together to produce a final recommendation result.
The current built in runtime item recommendation algorithms are as follows:
|Runtime Item Recommendation Algorithm||Offline Model|
||matrix factorization model|
||matrix factorization model|
||item activity model|
Applying a Configuration
Use the seldon-cli to apply a configuation to a client.
Algorithms that utilize a matrix factorization based model.
Description : Utilizes the derived offline latent factors to provide a set of recommendations for a user.
Description : Uses the recent item interactions to create a snapshot latent representation of the user from the item factors and use that to recommend new content.
Optional config setting for this algorithm are:
io.seldon.algorithm.general.numrecentactionstouse: integer - number of recent item interactions to use to score against
Algorithms that utilize activity based item similarity.
Description : Uses the recent item interactions to find a set of top scoring similar items to recommend
This recommender can be used to serve most popular recommendations. It counts which items are being read with a exponentially decaying score to control how fast old article counts are forgotton.
The above configuration ensures:
- the expoential decay is set to 10800 seconds. The time after which the item activity counts have a negligible effect.
- uses a bucket cluster to ensure every user’s activity is caught.
A set of baseline algorithms used for testing and as final algorithms to use if all other algorithms fail to provide recommendations for a user.
Description : Return the most recently added items, e.g., in a news setting the most recent published articles.
Seldon allows you to deploy your own recommendation runtime scorer using its microservices as described here
io.seldon.algorithm.external.url: string - The URL for the microservice
io.seldon.algorithm.external.name: String - the name to give to the runtime scorer
io.seldon.algorithm.inclusion.itemsperincluder: integer - the number of recent items to pass to the external scorer for scoring
Seldon running inside Kubernetes provides a utility script start-microservice to start a recommendation microservice packaged as a Docker container.