lenskit.flexmf.FlexMFNCFConfig#

class lenskit.flexmf.FlexMFNCFConfig(/, **data)#

Bases: lenskit.flexmf._implicit.FlexMFImplicitConfig

Configuration for NCF (Neural Collaborative Filtering) Scorer. It inherits common training options and implicit-feedback settings from FlexMFImplicitConfig. The inherited embedding_size field is used as the GMF embedding size.

Stability:

Experimental

Parameters:

data (Any)

mlp_embedding_size: pydantic.PositiveInt = 8#

The size of the MLP embedding space.

mlp_layer_sizes: list[pydantic.PositiveInt]#

The sizes of the MLP hidden layers.

negative_count: pydantic.PositiveInt = 4#

The number of negative items to sample for each positive item. NCF defaults to 4, following the original NCF paper.

user_bias: bool | None = False#

Whether to learn a user bias term, added to the NCF output score. NCF defaults to False to match the original model, since the final prediction layer already has a global bias; set to True (or None for the implicit-feedback default) to enable it.

item_bias: bool = False#

Whether to learn an item bias term, added to the NCF output score. NCF defaults to False to match the original model.