PMF¶
-
class
openrec.legacy.recommenders.
PMF
(batch_size, dim_embed, max_user, max_item, test_batch_size=None, l2_reg=None, opt='SGD', sess_config=None)¶ -
_build_default_interactions
(train=True)¶ Build default interaction modules (may be overriden).
Parameters: train (bool) – An indicator for training or servining phase.
-
_build_extra_inputs
(train=True)¶ Build inputs for contextual data sources (should be overriden)
Parameters: train (bool) – An indicator for training or servining phase.
-
_build_item_extractions
(train=True)¶ Build extraction modules for items’ data sources (should be overriden)
Parameters: train (bool) – An indicator for training or servining phase.
-
_build_item_inputs
(train=True)¶ Build inputs for items’ data sources (should be overriden)
Parameters: train (bool) – An indicator for training or servining phase.
-
_build_serving_graph
()¶ Call sub-functions to build serving graph (do NOT override).
-
_build_user_extractions
(train=True)¶ Build extraction modules for users’ data sources (should be overriden)
Parameters: train (bool) – An indicator for training or servining phase.
-
_build_user_inputs
(train=True)¶ Build inputs for users’ data sources (should be overriden)
Parameters: train (bool) – An indicator for training or servining phase.
-
_input_mappings
(batch_data, train)¶ Define mappings from input training batch to defined inputs.
Parameters: - batch_data (dict) – A training batch.
- train (bool) – An indicator for training or servining phase.
Returns: The mapping where a key corresponds to an input object, and a value corresponds to a
batch_data
value.Return type: dict
-