The folders TML and TMLCI contains the Matlab codes for the two-way logistic model without and with covariate information. In each folder, * pre.m: Pre-process the MovieLens data into .mat format. * main.m: Fit the model with training data and compute RMSE on tuning and testing data. * graident.m, predict.m: Functions used by main.m gen.m contains the codes to generate data according to the two-way logistic model with covariate information for simlulation study.