#NEWLINE# def recommend_items( self , dataset , u , max_items = 10 , return_scores = True , item_features = None ) : #NEWLINE# #INDENT# '\n        Recommend new items for a user.\n\n        Parameters\n        ==========\n        dataset : scipy.sparse.csr_matrix\n            User-item matrix containing known items.\n        u : int\n            Index of user for which to make recommendations.\n        max_items : int\n            Maximum number of recommended items to return.\n        return_scores : bool\n            If true return a score along with each recommended item.\n        item_features : array_like, shape = [num_items, num_features]\n            Features for items in training set, required by some recommenders.\n\n        Returns\n        =======\n        recs : list\n            List of (idx,score) pairs if return_scores is True, else\n            just a list of idxs.\n        ' #NEWLINE# candidates = self . item_similarity_recommender . recommend_items ( dataset , u , self . num_candidates , return_scores = False ) #NEWLINE# return self . rerank ( u , candidates , max_items , return_scores = return_scores )