Hello, in this video I'm going to introduce the first programming assignment of this course where you're going to develop a matrix factorization collaborative filter. You're going to be doing this in LensKit as you have with the assignments in the previous courses. And we're going to have you use an SVD solver from a linear algebra package from Apache. And you're going to use the standard 3-class setup. The item scorer, the model, the model provider. And this is going to allow you to get a flavor of how this matrix factorization thing works. So the basic requirements are you need to implement SVDModelBuilder to compute the singular value decomposition. To handle the missing values, we're going to use the offset from baseline method. So we talk about impuding, and we talked about centering off on a baseline. So what we're going to do is, we're going to take baseline score in this case, the user item average. We're going to subtract that from every rating. Missing values then, in our matrix, are just going to be zero. Then we'll compute the SVD and use that to generate our predictions. Then you need to implement the SVDItemScorer to use the singular value decomposition to actually score users and then you're going to run an experiment to compare configurations. Particularly to figure out, to compare the different baselines, global mean, user mean, item mean and to look at the impact of the number of latent features we use on the recommendation accuracy. So provided starting code a Gradle project is imported. It builds and runs and doesn't score. And it's got TODOs for you to fill in. So we have the project you can run it. By running the predict or the recommended Gradle task. The code is layed out as it has been for our other one's. We have the item score. Which you're going to need to fill in some to dos in. We have the model class which your not going to need to change yourself that takes that stores the singular value decomposition. And then we have the model builder that you're going to need to implement that computes the singular value decomposition. We have TODOs in there, and you need to fill in the matrix. Then we're going to run the singular value decomposition, that's just a matter of creating a singular value decomposition object, and then you need to truncate it. And in order to map user and item IDs to row and column numbers, like we need in order to work with the linear algebra package. We use this thing called a key index, and you can find out more about the key indexes in the LensKit API documentation that's linked to from the LensKit for learning website. And they map. What a key index does is it maps IDs that are longs, user IDs, item IDs, whatever IDs, to contiguous zero integers starting from zero. So you'll have an item zero, one, two, three even if your item IDs are 798, 483 and 6,292. So we can use this to work with the linear algebra package. The SVDModelBuilder takes a parameters. The first, the data access object, you've seen these before. The bias model is where we're going to get our underlying baseline scores. Global mean, user mean, item mean, user item personalized mean. And then the latent feature count and features that is the number of latent features that we want to keep in this, that's the number of latent features we want to keep in the model. You're going to use that when you actually go to truncate your SVD to create the truncated low rank model. The rating matrix Is baseline scores plus user features. And item features. And weights. So the score for an item and a user is the baseline score plus the sum over features of the user feature value, item feature value and the weight. The baseline score is a global baseline plus an item baseline plus a user baseline. Now this baseline model, the bias model provides those values. We have the getIntercept, which gives us our global bias b. The getUserBias gives us our user bias b sub u and the getItemBias gives us our item bias b sub i. Different configurations are going to provide different bias models. We've got four different configurations, global, user, item and both so you need to use all of these methods so the baseline you're going to use to subtract is intercept plus UserBias plus ItemBias. It's just that for example when we're only using the user main the ItemBias is always going to return zero. That's taken care of for you so that you can write one piece of code and then we can experiment using that one piece of code with different designs or with different choices of the underlying model to see what impact that makes on the quality of the resulting recommender. As with the assignments in the first two courses, you're going to to submit a compile JAR file to Coursera that's going to be automatically graded. Details in the assignment description. But also like the evaluation assignment in course three, there's a quiz in this programming assignment that you're going to answer based on the results of running LensKit evaluation experiment with the algorithm you just wrote. Now be sure to leave plenty of time for this assignment because running the algorithm takes time. And running the experiment is going to take as much time as it takes to train all of your algorithms. As a rough point of reference, on a Surface Pro 4 with a Core i5, It takes two minutes to train one singular value decomposition model. It takes more time on slower computers, and on an i7 it takes about one and three quarter minute. So you need to leave quite a bit of time in order to be able to get the evaluation results and be able to complete the assignment. We hope you enjoy working on it.