I have a Recommender system which uses a Collaborative bayesian approach using pSDAE for recommending scientific articles from the Citeulike Dataset
The text information (as input to pSDAE) is in the file mult.dat and the rating matrix (as input for the MF part) is in the file cf-train-1-users.dat and is loaded using the following code:
def get_mult(): X = read_mult('mult.dat',8000).astype(np.float32) return X def read_user(f_in='cf-train-1-users.dat',num_u=5551,num_v=16980): fp = open(f_in) R = np.mat(np.zeros((num_u,num_v))) for i,line in enumerate(fp): segs = line.strip().split(' ')[1:] for seg in segs: R[i,int(seg)] = 1 return R
The raw data is in proper Excel format with citations as doc-id, title, citeulike-id, raw-title, raw-abstract.
The mult.dat file containing hte text information looks like:
The trainusers.dat file looks like:
Here is the link to th ipynb for the whole Recommender system: