coefficients [we are now going to run leave- -out cross-validation loop for in xrange(reviews shape[ ])for all user ids es np delete(es, , all but user np delete(reviewsu , np where( we only care about actual predictions es[:, , [ reg fit( ,ycoefficients append(reg coef_prediction reg predict(es[:, ,reviews[ tmeasure error as before the result is an rmse of almost exactly we can also analyze the coefficients variable to find out how well our predictors fareprint coefficients mean( the mean value across all users the values of the array are the estimate of the most similar movie has the highest weight (it was the best individual predictionso it is not surprising)and we can drop the correlation-based method from the learning process as it has little influence on the final result what this setting does is it makes it easy to add few extra ideasfor exampleif the single most similar movie is good predictorhow about we use the five most similar movies in the learning process as wellwe can adapt the earlier code to generate the -th most similar movie and then use the stacked learner to learn the weightses usermodel estimate_all(similar_movie estimate_all( = )similar_movie estimate_all( = )similar_movie estimate_all( = )similar_movie estimate_all( = )similar_movie estimate_all( = )the rest of the code remains as beforewe gained lot of freedom in generating new machine learning systems in this casethe final result is not betterbut it was easy to test this new idea