def load_factors(self,user_factor_filepath,item_factor_filepath,fmt):
        if fmt == 'npy':
            self.U = np.load(user_factor_filepath)
            self.V = np.load(item_factor_filepath)
        elif fmt == 'mm':
            self.U = mmread(user_factor_filepath)
            self.V = mmread(item_factor_filepath)
        elif fmt == 'tsv':
            self.U = np.loadtxt(user_factor_filepath)
            self.V = np.loadtxt(item_factor_filepath)
        else:
            raise ValueError('unknown input format {0}'.format(fmt))
        # ensure that memory layout avoids extra allocation in dot product
        self.U = np.asfortranarray(self.U)
Load precomputed user and item factors from file.
dataset/ETHPy150Open Mendeley/mrec/mrec/mf/recommender.py/MatrixFactorizationRecommender.load_factors