lenskit.knn.ease.EASEScorer =========================== .. py:class:: lenskit.knn.ease.EASEScorer(config = None, **kwargs) Bases: :py:obj:`lenskit.pipeline.Component`\ [\ :py:obj:`lenskit.data.ItemList`\ ], :py:obj:`lenskit.training.Trainable` Embarrassingly shallow autoencoder :cite:p:`steckEmbarrassinglyShallowAutoencoders2019`. In addition to its configuation, this component also uses a :ref:`training environment variable ` :envvar:`LK_EASE_SOLVER`. .. envvar:: LK_EASE_SOLVER Specify the solver to use to invert the Gram-matrix for EASE. Can be either ``"torch"`` (works on both CPU and CUDA, and is faster on CPU than SciPy) or ``"scipy"`` (uses LAPACK, and may take less memory). The default behavior is to first try to allocate enough memory to train with PyTorch, and to fall back to SciPy with in-place solving if the Torch allocation fails. .. note:: This component requires SciPy 1.17 or later. .. py:attribute:: config :type: EASEConfig EASE configuration. .. py:attribute:: items :type: lenskit.data.Vocabulary Items known at training time. .. py:attribute:: weights :type: lenskit.data.types.NPMatrix[numpy.float32] Item interpolation weight matrix. .. py:method:: is_trained() Query if this component has already been trained. .. py:method:: train(data, options = None) 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.