lenskit.als.ALSConfig#
- class lenskit.als.ALSConfig#
Bases:
lenskit.config.common.EmbeddingSizeMixin,pydantic.BaseModelConfiguration for ALS scorers.
- embedding_size: pydantic.PositiveInt#
The dimension of user and item embeddings (number of latent features to learn).
- epochs: pydantic.PositiveInt = 10#
The number of epochs to train.
- regularization: pydantic.PositiveFloat | lenskit.data.types.UIPair[pydantic.PositiveFloat] = 0.1#
L2 regularization strength.
- user_embeddings: bool | Literal['prefer'] = True#
Whether to retain user embeddings after training. If
True, they are retained, but are ignored if the query has historical items; ifFalse, they are not. If set to"prefer", then the user embeddings from training time are used even if the query has a user history. This makes inference faster when histories only consist of the user’s items from the training set.