lenskit.als.ALSConfig ===================== .. py:class:: lenskit.als.ALSConfig :canonical: lenskit.als._common.ALSConfig Bases: :py:obj:`lenskit.config.common.EmbeddingSizeMixin`, :py:obj:`pydantic.BaseModel` Configuration for ALS scorers. .. py:attribute:: embedding_size :type: pydantic.PositiveInt The dimension of user and item embeddings (number of latent features to learn). .. py:attribute:: epochs :type: pydantic.PositiveInt :value: 10 The number of epochs to train. .. py:attribute:: regularization :type: pydantic.PositiveFloat | lenskit.data.types.UIPair[pydantic.PositiveFloat] :value: 0.1 L2 regularization strength. .. py:attribute:: user_embeddings :type: bool | Literal['prefer'] :value: True Whether to retain user embeddings after training. If ``True``, they are retained, but are ignored if the query has historical items; if ``False``, 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. .. py:property:: user_reg :type: float .. py:property:: item_reg :type: float