def fit(self, users, items, user_features=None, item_features=None):
        """
        Fit the user/item id and feature name mappings.

        Calling fit the second time will reset existing mappings.

        Parameters
        ----------

        users: iterable of user ids
        items: iterable of item ids
        user_features: iterable of user features, optional
        item_features: iterable of item features, optional
        """

        self._user_id_mapping = {}
        self._item_id_mapping = {}
        self._user_feature_mapping = {}
        self._item_feature_mapping = {}

        return self.fit_partial(users, items, user_features, item_features)
def fit ( self , users , items , user_features = None , item_features = None ) : self . _user_id_mapping = { } self . _item_id_mapping = { } self . _user_feature_mapping = { } self . _item_feature_mapping = { } return self . fit_partial ( users , items , user_features , item_features )
Fit the user/item id and feature name mappings.

        Calling fit the second time will reset existing mappings.

        Parameters
        ----------

        users: iterable of user ids
        items: iterable of item ids
        user_features: iterable of user features, optional
        item_features: iterable of item features, optional