lenskit.hpf#

Classes

HPFScorer(features, **kwargs)

Hierarchical Poisson factorization, provided by hpfrec.

class lenskit.hpf.HPFScorer(features, **kwargs)#

Bases: Component, Trainable

Hierarchical Poisson factorization, provided by hpfrec.

Todo

Right now, this uses the ‘rating’ as a count. Actually use counts.

Parameters:
  • features (int) – the number of features

  • kwargs – additional arguments to pass to hpfrec.HPF.

get_config()#

Get the configuration by inspecting the constructor and instance variables.

property is_trained: bool#

Check if this model has already been trained.

train(data)#

Train the pipeline component to learn its parameters from a training dataset.

Parameters:
  • data (Dataset) – The training dataset.

  • retrain – If True, retrain the model even if it has already been trained.