Last week we used PCA to make recommendations to users for artists. For our small data with many missing ratings (NaN) made it difficult to derive stable recommendations. One way to deal with this situation is to use PCA first to generate lower dimensional user and artist factors, but then use another model to make rating predictions based on the user specific factors. Below are two scripts that use the Matlab regression tree function to make predictions based on two PDA factors. One is keeping the unknown ratings as is, the other replaces those ratings with the average rating before generating PCA factors.