solet' go ahead and run thisand see what we end up with the output of the following code is as followsthe results aren' that unreasonable sowe are using as an example the movie toy storywhich is movieid and what we came back withfor the top nearest neighborsare pretty good selection of comedy and children' movies sogiven that toy story is popular comedy and children' moviewe got bunch of other popular comedy and children' moviessoit seems to workwe didn' have to use bunch of fancy collaborative filtering algorithmsthese results aren' that bad nextlet' use knn to predict the ratingwhere we're thinking of the rating as the classification in this examplebwh bujoh following is the output of the preceding codewe end up with predicted rating of which actually isn' all that different from the actual rating for that moviewhich was so not greatbut it' not too bad eitheri mean it actually works surprisingly wellgiven how simple this algorithm isactivity most of the complexity in this example was just in determining our distance metricand you know we intentionally got little bit fancy there just to keep it interestingbut you can do anything else you want to soif you want fiddle around with thisi definitely encourage you to do so our choice of for was completely out of thin airi just made that up how does this respond to different valuesdo you get better results with higher value of kor with lower value of kdoes it matter