lenskit.als.ALSBase =================== .. py:class:: lenskit.als.ALSBase(config = None, **kwargs) :canonical: lenskit.als._common.ALSBase Bases: :py:obj:`lenskit.training.UsesTrainer`, :py:obj:`lenskit.pipeline.Component`\ [\ :py:obj:`lenskit.data.ItemList`\ ], :py:obj:`abc.ABC` Base class for ALS models. :Stability: Caller .. py:attribute:: config :type: ALSConfig The component configuration object. Component classes that support configuration **must** redefine this attribute with their specific configuration class type, which can be a Python dataclass or a Pydantic model class. .. py:attribute:: users :type: lenskit.data.Vocabulary | None .. py:attribute:: items :type: lenskit.data.Vocabulary .. py:attribute:: user_embeddings :type: lenskit.data.types.NPMatrix | None .. py:attribute:: item_embeddings :type: lenskit.data.types.NPMatrix .. py:property:: logger :type: structlog.stdlib.BoundLogger .. py:method:: __call__(query, items) Run the pipeline's operation and produce a result. This is the key method for components to implement. .. py:method:: new_user_embedding(user_num, items) :abstractmethod: Generate an embedding for a user given their current ratings. .. py:method:: finalize_scores(user_num, items, user_bias) Perform any final transformation of scores prior to returning them.