def fit_partial(<EOL>self, users=None, items=None, user_features=None, item_features=None<EOL>):
if users is not None:<EOL><INDENT>for user_id in users:<EOL><INDENT>self._user_id_mapping.setdefault(user_id, len(self._user_id_mapping))<EOL>if self._user_identity_features:<EOL><INDENT>self._user_feature_mapping.setdefault(<EOL>user_id, len(self._user_feature_mapping)<EOL>)<EOL><DEDENT><DEDENT><DEDENT>if items is not None:<EOL><INDENT>for item_id in items:<EOL><INDENT>self._item_id_mapping.setdefault(item_id, len(self._item_id_mapping))<EOL>if self._item_identity_features:<EOL><INDENT>self._item_feature_mapping.setdefault(<EOL>item_id, len(self._item_feature_mapping)<EOL>)<EOL><DEDENT><DEDENT><DEDENT>if user_features is not None:<EOL><INDENT>for user_feature in user_features:<EOL><INDENT>self._user_feature_mapping.setdefault(<EOL>user_feature, len(self._user_feature_mapping)<EOL>)<EOL><DEDENT><DEDENT>if item_features is not None:<EOL><INDENT>for item_feature in item_features:<EOL><INDENT>self._item_feature_mapping.setdefault(<EOL>item_feature, len(self._item_feature_mapping)<EOL>)<EOL><DEDENT><DEDENT>
Fit the user/item id and feature name mappings.

Calling fit the second time will add new entries to existing mappings.

Parameters
----------

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