lenskit.sklearn.svd.BiasedSVDScorer =================================== .. py:class:: lenskit.sklearn.svd.BiasedSVDScorer(config = None, **kwargs) Bases: :py:obj:`lenskit.pipeline.Component`\ [\ :py:obj:`lenskit.data.ItemList`\ ], :py:obj:`lenskit.training.Trainable` Biased matrix factorization for explicit feedback using SciKit-Learn's :class:`~sklearn.decomposition.TruncatedSVD`. It operates by first computing the bias, then computing the SVD of the bias residuals. You'll generally want one of the iterative SVD implementations such as :class:`lenskit.als.BiasedMFScorer`; this is here primarily as an example and for cases where you want to evaluate a pure SVD implementation. :Stability: Caller .. py:attribute:: config :type: BiasedSVDConfig 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:: bias :type: lenskit.basic.BiasModel .. py:attribute:: factorization :type: sklearn.decomposition.TruncatedSVD .. py:attribute:: users :type: lenskit.data.Vocabulary .. py:attribute:: items :type: lenskit.data.Vocabulary .. py:attribute:: user_components :type: numpy.typing.NDArray[numpy.float64] .. py:method:: is_trained() Query if this component has already been trained. .. py:method:: train(data, options = TrainingOptions()) Train the model to learn its parameters from a training dataset. :param data: The training dataset. :param options: The training options. .. py:method:: __call__(query, items) Run the pipeline's operation and produce a result. This is the key method for components to implement.